{{- if .Values.ingress.enabled }} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ .Release.Name }}-ingress annotations: {{ toYaml .Values.ingress.annotations | indent 4 }} spec: rules: {{- range .Values.ingress.hosts }} - host: {{ .host }} http: paths: {{- range .paths }} - path: {{ .path }} pathType: {{ .pathType }} backend: service: name: {{ $.Release.Name }}-service port: number: {{ $.Values.service.port }} {{- end }} {{- end }} tls: {{ toYaml .Values.ingress.tls | indent 4 }} {{- end }}