charts/home-assistant/templates/configurator-ingress.yaml

41 lines
1.2 KiB
YAML
Raw Normal View History

2018-07-03 03:50:38 +00:00
{{- 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 }}