{{- if .Values.ingress.enabled }} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: {{ include "mimir.fullname" . }} labels: {{- include "mimir.labels" (dict "ctx" .) | nindent 4 }} {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} namespace: {{ .Release.Namespace | quote }} spec: {{- with .Values.ingress.ingressClassName }} ingressClassName: {{ . }} {{- end -}} {{- with .Values.ingress.tls }} tls: {{- range . }} - hosts: {{- range .hosts }} - {{ tpl . $ | quote }} {{- end }} {{- with .secretName }} secretName: {{ . }} {{- end }} {{- end }} {{- end }} rules: {{- range $.Values.ingress.hosts }} - host: {{ tpl . $ | quote }} http: paths: {{- range $svcName, $paths := $.Values.ingress.paths }} {{- range $paths }} - path: {{ .path }} pathType: {{ .pathType | default "Prefix" }} backend: service: name: {{ include "mimir.fullname" $ }}-{{ $svcName }} port: number: {{ include "mimir.serverHttpListenPort" $ }} {{- end }} {{- end }} {{- end }} {{- end }}