2018-11-08 22:18:48 +01:00
|
|
|
{{- if .Values.ingress.enabled }}
|
|
|
|
{{- range .Values.ingress.hosts }}
|
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Ingress
|
|
|
|
metadata:
|
|
|
|
name: "{{ $.Release.Name }}-ingress"
|
|
|
|
labels:
|
|
|
|
app: {{ $.Values.website.name }}
|
|
|
|
chart: "{{ $.Chart.Name }}-{{ $.Chart.Version }}"
|
|
|
|
release: "{{ $.Release.Name }}"
|
|
|
|
heritage: "{{ $.Release.Service }}"
|
|
|
|
annotations:
|
|
|
|
{{- if .tls }}
|
|
|
|
ingress.kubernetes.io/secure-backends: "true"
|
|
|
|
{{- end }}
|
|
|
|
{{- range $key, $value := .annotations }}
|
|
|
|
{{ $key }}: {{ $value | quote }}
|
|
|
|
{{- end }}
|
|
|
|
spec:
|
|
|
|
rules:
|
|
|
|
- host: {{ .name }}
|
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- path: {{ default "/" .path }}
|
|
|
|
backend:
|
2018-11-26 19:42:10 +01:00
|
|
|
serviceName: {{ .Release.Name }}-{{ $.Values.website.service.name }}
|
2018-11-08 22:18:48 +01:00
|
|
|
servicePort: {{ $.Values.website.service.port }}
|
|
|
|
{{- if .tls }}
|
|
|
|
tls:
|
|
|
|
- hosts:
|
|
|
|
- {{ .name }}
|
|
|
|
secretName: {{ .tlsSecret }}
|
|
|
|
{{- end }}
|
|
|
|
---
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|