|
| 1 | +{{- if and .Values.ingress.create .Values.ingress.wellknownIngress.enabled }} |
| 2 | +{{- $paths := (include "flyte-binary.ingress.wellknownPaths" .) | fromYamlArray }} |
| 3 | +apiVersion: networking.k8s.io/v1 |
| 4 | +kind: Ingress |
| 5 | +metadata: |
| 6 | + name: {{ include "flyte-binary.fullname" . }}-wellknown |
| 7 | + namespace: {{ .Release.Namespace | quote }} |
| 8 | + labels: {{- include "flyte-binary.labels" . | nindent 4 }} |
| 9 | + {{- if .Values.commonLabels }} |
| 10 | + {{- tpl ( .Values.commonLabels | toYaml ) . | nindent 4 }} |
| 11 | + {{- end }} |
| 12 | + {{- if .Values.ingress.labels }} |
| 13 | + {{- tpl ( .Values.ingress.labels | toYaml ) . | nindent 4 }} |
| 14 | + {{- end }} |
| 15 | + annotations: |
| 16 | + {{- if .Values.commonAnnotations }} |
| 17 | + {{- tpl ( .Values.commonAnnotations | toYaml ) . | nindent 4 }} |
| 18 | + {{- end }} |
| 19 | + {{- if .Values.ingress.commonAnnotations }} |
| 20 | + {{- tpl ( .Values.ingress.commonAnnotations | toYaml ) . | nindent 4 }} |
| 21 | + {{- end }} |
| 22 | + {{- if .Values.ingress.wellknownIngress.annotations }} |
| 23 | + {{- tpl ( .Values.ingress.wellknownIngress.annotations | toYaml ) . | nindent 4 }} |
| 24 | + {{- end }} |
| 25 | +spec: |
| 26 | + {{- if .Values.ingress.wellknownIngress.ingressClassName }} |
| 27 | + ingressClassName: {{ .Values.ingress.wellknownIngress.ingressClassName | quote }} |
| 28 | + {{- else if .Values.ingress.ingressClassName }} |
| 29 | + ingressClassName: {{ .Values.ingress.ingressClassName | quote }} |
| 30 | + {{- end }} |
| 31 | + {{- if .Values.ingress.wellknownIngress.tls }} |
| 32 | + tls: {{- tpl ( .Values.ingress.wellknownIngress.tls | toYaml ) . | nindent 2 }} |
| 33 | + {{- else if .Values.ingress.tls }} |
| 34 | + tls: {{- tpl ( .Values.ingress.tls | toYaml ) . | nindent 2 }} |
| 35 | + {{- end }} |
| 36 | + rules: |
| 37 | + - http: |
| 38 | + paths: |
| 39 | + {{- range $path := $paths }} |
| 40 | + - path: {{ $path }} |
| 41 | + {{- if semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion }} |
| 42 | + pathType: ImplementationSpecific |
| 43 | + {{- end }} |
| 44 | + backend: |
| 45 | + {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} |
| 46 | + service: |
| 47 | + name: {{ include "flyte-binary.service.http.name" $ }} |
| 48 | + port: |
| 49 | + number: {{ include "flyte-binary.service.http.port" $ }} |
| 50 | + {{- else }} |
| 51 | + serviceName: {{ include "flyte-binary.service.http.name" $ }} |
| 52 | + servicePort: {{ include "flyte-binary.service.http.port" $ }} |
| 53 | + {{- end }} |
| 54 | + {{- end }} |
| 55 | + {{- if .Values.ingress.host }} |
| 56 | + host: {{ tpl .Values.ingress.host . | quote }} |
| 57 | + {{- end }} |
| 58 | +{{- end }} |
0 commit comments