{{- if and .Values.configurator.enabled .Values.configurator.ingress.enabled -}} {{- $fullName := include "home-assistant.configurator.fullname" . -}} {{- $servicePort := .Values.configurator.service.port -}} {{- $ingressPath := .Values.configurator.ingress.path -}} apiVersion: extensions/v1beta1 kind: Ingress metadata: name: {{ $fullName }} labels: app: {{ template "home-assistant.name" . }} chart: {{ template "home-assistant.chart" . }} component: "{{ .Release.Name }}-{{ .Values.configurator.name }}" release: {{ .Release.Name }} heritage: {{ .Release.Service }} {{- with .Values.configurator.ingress.annotations }} annotations: {{ toYaml . | indent 4 }} {{- end }} spec: {{- if .Values.configurator.ingress.tls }} tls: {{- range .Values.configurator.ingress.tls }} - hosts: {{- range .hosts }} - {{ . }} {{- end }} secretName: {{ .secretName }} {{- end }} {{- end }} rules: {{- range .Values.configurator.ingress.hosts }} - host: {{ . }} http: paths: - path: {{ $ingressPath }} backend: serviceName: {{ $fullName }} servicePort: {{ $servicePort }} {{- end }} {{- end }}