charts/teslamate/templates/ingress.yaml
Jeff Billimek b332249e9d
Introduces the teslamate chart (#106)
* Introduces the teslamate chart

Fixes #101

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

* get on the startupprobe bandwagon
2019-12-22 00:19:10 -05:00

39 lines
1.0 KiB
YAML

{{- if .Values.ingress.enabled -}}
{{- $fullName := include "teslamate.fullname" . -}}
{{- $ingressPath := .Values.ingress.path -}}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
app.kubernetes.io/name: {{ include "teslamate.name" . }}
helm.sh/chart: {{ include "teslamate.chart" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- 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 }}