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

43 lines
1.1 KiB
YAML
Raw Normal View History

2024-03-26 10:56:05 +01:00
{{- if .Values.ingress.enabled -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ include "home-assistant.fullname" . }}
labels:
{{- include "home-assistant.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- with .Values.ingress.className }}
ingressClassName: {{ . }}
{{- end }}
{{- with .Values.ingress.tls }}
tls:
{{- toYaml . | nindent 4 }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: {{ include "home-assistant.fullname" $ }}
port:
name: http
{{- if $.Values.zigbee2mqtt }}
- path: /zigbee2mqtt
pathType: Prefix
backend:
service:
name: {{ include "home-assistant.fullname" $ }}-zigbee2mqtt
port:
name: http
{{- end }}
{{- end }}
{{- end }}