Files
CmiiDeploy/1-outside-deploy/2-helm-chart/charts/all-ingress-config/templates/ingress-backend.yaml
zeaslity 437acbeb63 add
2024-10-30 16:30:51 +08:00

35 lines
1.2 KiB
YAML

{{- if and .Values.enabled .Values.backendApplication.enabled }}
{{- $namespace := .Release.Namespace -}}
{{- $TenantEnvironment := .Values.global.domain.TenantEnvironment -}}
{{- $scope := $ -}}
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: backend-applications-ingress
namespace: {{ $namespace }}
labels:
type: {{ .Values.backendApplication.type }}
accessmode: {{ $.Values.backendApplication.accessmode }}
helm.sh/chart: {{ include "all-ingress.name" $scope }}
app.kubernetes.io/managed-by: {{ $.Release.Service }}
{{- if $.Values.global.image.tag }}
app.kubernetes.io/version: {{ $.Values.global.image.tag | quote }}
{{- end }}
annotations:
kubernetes.io/ingress.class: "nginx"
nginx.ingress.kubernetes.io/enable-cors: "true"
spec:
rules:
{{- range $key,$value := .Values.backendApplication.manifest }}
{{- $applicationName := $key | trunc 63 }}
- host: {{ $applicationName }}.uavcloud-{{ $TenantEnvironment }}.io
http:
paths:
- path: /
backend:
serviceName: {{ $applicationName }}
servicePort: 8080
{{- end }}
---
{{- end }}