{{- if .Values.ingress.enabled }} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ include "app.fullname" . }} namespace: {{ include "app.namespace" . }} labels: {{- include "app.labels" . | nindent 4 }} {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: ingressClassName: {{ .Values.ingress.className }} {{- if .Values.ingress.api.tls }} tls: {{- range .Values.ingress.api.tls }} - hosts: {{- range .hosts }} - {{ . | quote }} {{- end }} secretName: {{ .secretName }} {{- end }} {{- range .Values.ingress.git.tls }} - hosts: {{- range .hosts }} - {{ . | quote }} {{- end }} secretName: {{ .secretName }} {{- end }} {{- end }} rules: {{- range .Values.ingress.api.hosts }} - host: {{ .host | quote }} http: paths: {{- range .paths }} - path: {{ .path }} pathType: {{ .pathType }} backend: service: name: {{ include "app.serviceFullname" (dict "root" $ "name" "gitdata") }} port: number: {{ $.Values.gitdata.service.port }} {{- end }} {{- if $.Values.web.enabled }} - path: / pathType: Prefix backend: service: name: {{ include "app.serviceFullname" (dict "root" $ "name" "web") }} port: number: {{ $.Values.web.service.port }} {{- end }} {{- end }} {{- range .Values.ingress.git.hosts }} - host: {{ .host | quote }} http: paths: {{- range .paths }} - path: {{ .path }} pathType: {{ .pathType }} backend: service: name: {{ include "app.serviceFullname" (dict "root" $ "name" "gitpod") }}-http port: number: {{ $.Values.gitpod.service.port }} {{- end }} {{- end }} {{- end }}