charts/frigate/templates/ingress.yaml
Jeff Billimek d3b3ef83a9
refactoring frigate ingress (#50)
* frigate helm chart

Signed-off-by: Jeff Billimek <jeff@billimek.com>

* remove trailing spaces

* bump chart version

* refactoring frigate ingress
2019-07-26 23:39:18 -04:00

35 lines
842 B
YAML

{{- if .Values.ingress.enabled -}}
{{- $fullName := include "frigate.fullname" . -}}
{{- $ingressPath := .Values.ingress.path -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{ include "frigate.labels" . | indent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ . | quote }}
http:
paths:
- path: {{ $ingressPath }}
backend:
serviceName: {{ $fullName }}
servicePort: http
{{- end }}
{{- end }}