{{- range $name, $component := .Values.ingresses }} {{- if $component.enabled -}} --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ include "chart.componentFullname" (dict "root" $ "name" $name) }} labels: {{- include "chart.componentLabels" (dict "root" $ "name" $name) | nindent 4 }} {{- with $component.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: {{- with $component.className }} ingressClassName: {{ . }} {{- end }} {{- if $component.tls }} tls: {{- range $component.tls }} - hosts: {{- range .hosts }} - {{ . | quote }} {{- end }} secretName: {{ .secretName }} {{- end }} {{- end }} rules: {{- range $component.hosts }} - {{- with .host }} host: {{ . | quote }} {{- end }} http: paths: {{- range .paths }} - path: {{ .path }} {{- with .pathType }} pathType: {{ . }} {{- end }} backend: service: name: {{ include "chart.componentFullname" (dict "root" $ "name" .component) }} port: number: {{ index $.Values.components .component "service" "port" }} {{- end }} {{- end }} {{- end }} {{- end }}