{{- if .Values.ingress.enabled }} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ .Values.ingress.name }} namespace: {{ .Values.namespace }} annotations: {{- range $key, $value := .Values.ingress.annotations }} {{ $key }}: {{ $value | quote }} {{- end }} spec: ingressClassName: {{ .Values.ingress.className }} rules: - host: {{ .Values.ingress.host }} http: paths: - path: {{ .Values.ingress.path }} pathType: {{ .Values.ingress.pathType }} backend: service: name: {{ .Values.service.name }} port: number: {{ .Values.service.port }} {{- if .Values.ingress.tls.enabled }} tls: - hosts: {{- range .Values.ingress.tls.hosts }} - "{{ . }}" {{- end }} secretName: {{ .Values.ingress.tls.secretName }} {{- end }} {{- end }}