Развертывание Reporting API
Обновлено: 05.03.2024
Reporting API — приложение для построения отчетов
Деплоймент:
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: onprem
name: reporting
labels:
appName: reporting
spec:
selector:
matchLabels:
appName: reporting-app
template:
metadata:
labels:
appName: reporting-app
spec:
containers:
- name: reporting
image: cr.yandex/crp59o9bco4fjas7oa2v/reporting:latest
ports:
- protocol: TCP
containerPort: 5403
env:
- name: "ASPNETCORE_URLS"
value: "http://*:5403"
volumeMounts:
- mountPath: /app/secrets
name: app-settings
readOnly: true
volumes:
- name: app-settings
secret:
secretName: app-settings
Сервис и ingress-контроллер:
apiVersion: v1
kind: Service
metadata:
namespace: onprem
name: reporting-service
spec:
selector:
appName: reporting-app
ports:
- protocol: TCP
port: 80
targetPort: 5403
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
namespace: onprem
name: reporting-ingress
annotations:
cert-manager.io/cluster-issuer: "letsencrypt"
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/ssl-redirect: "false"
spec:
ingressClassName: "nginx"
tls:
- hosts:
- reporting.timetta-on-prem.com
secretName: reporting-timetta-test-tls
rules:
- host: reporting.timetta-on-prem.com
http:
paths:
- path: "/"
pathType: Prefix
backend:
service:
name: reporting-service
port:
number: 80