{{- if .Values.ingressBackend.enabled -}} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ include "chart.fullname" . }}-backend labels: {{- include "chart.labels" . | nindent 4 }} {{- with .Values.ingressBackend.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} spec: {{- with .Values.ingressBackend.className }} ingressClassName: {{ . }} {{- end }} {{- if .Values.ingressBackend.tls }} tls: {{- range .Values.ingressBackend.tls }} - hosts: {{- range .hosts }} - {{ . | quote }} {{- end }} secretName: {{ .secretName }} {{- end }} {{- end }} rules: {{- range .Values.ingressBackend.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 }}