2018-06-22 22:11:11 +02:00
|
|
|
{{- if .Values.ingress.enabled }}
|
|
|
|
{{- range .Values.ingress.hosts }}
|
2018-05-23 21:04:25 +02:00
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Ingress
|
|
|
|
metadata:
|
2018-06-22 22:11:11 +02:00
|
|
|
name: "{{ $.Release.Name }}-ingress"
|
2018-05-23 21:04:25 +02:00
|
|
|
labels:
|
2018-06-22 22:17:08 +02:00
|
|
|
app: {{ template "httpd.fullname" $ }}
|
2018-06-22 22:11:11 +02:00
|
|
|
chart: "{{ $.Chart.Name }}-{{ $.Chart.Version }}"
|
|
|
|
release: "{{ $.Release.Name }}"
|
|
|
|
heritage: "{{ $.Release.Service }}"
|
2018-05-23 21:04:25 +02:00
|
|
|
annotations:
|
2018-06-22 22:11:11 +02:00
|
|
|
{{- if .tls }}
|
|
|
|
ingress.kubernetes.io/secure-backends: "true"
|
|
|
|
{{- end }}
|
|
|
|
{{- range $key, $value := .annotations }}
|
|
|
|
{{ $key }}: {{ $value | quote }}
|
|
|
|
{{- end }}
|
2018-05-23 21:04:25 +02:00
|
|
|
spec:
|
2018-06-22 22:11:11 +02:00
|
|
|
rules:
|
|
|
|
- host: {{ .name }}
|
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- path: {{ default "/" .path }}
|
|
|
|
backend:
|
2018-06-22 22:17:08 +02:00
|
|
|
serviceName: {{ template "httpd.fullname" $ }}
|
2018-06-22 22:11:11 +02:00
|
|
|
servicePort: 80
|
|
|
|
{{- if .tls }}
|
2018-05-23 21:04:25 +02:00
|
|
|
tls:
|
2018-06-22 22:11:11 +02:00
|
|
|
- hosts:
|
|
|
|
- {{ .name }}
|
|
|
|
secretName: {{ .tlsSecret }}
|
2018-05-23 21:04:25 +02:00
|
|
|
{{- end }}
|
2018-06-22 22:11:11 +02:00
|
|
|
---
|
2018-05-23 21:04:25 +02:00
|
|
|
{{- end }}
|
2018-06-22 22:11:11 +02:00
|
|
|
{{- end }}
|