Files
deprecated-helm-charts/stable/wordpress/templates/ingress.yaml
T
Andres Martinez Gotor e086544f84 [stable/wordpress] Allow to specify a single hostname (#17861)
* Allow to specify a single hostname

Signed-off-by: Andres Martinez Gotor <andres@bitnami.com>

* Apply changes to values-production

Signed-off-by: Andres Martinez Gotor <andres@bitnami.com>
2019-10-11 06:33:40 -07:00

43 lines
1.2 KiB
YAML
Executable File

{{- if .Values.ingress.enabled }}
apiVersion: {{ template "wordpress.ingress.apiVersion" . }}
kind: Ingress
metadata:
name: {{ template "wordpress.fullname" . }}
labels:
app: "{{ template "wordpress.fullname" . }}"
chart: "{{ template "wordpress.chart" . }}"
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
annotations:
{{- if .Values.ingress.certManager }}
kubernetes.io/tls-acme: "true"
{{- end }}
{{- range $key, $value := .Values.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
rules:
{{- if .Values.ingress.hostname }}
- host: {{ .Values.ingress.hostname }}
http:
paths:
- path: /
backend:
serviceName: "{{ template "wordpress.fullname" $ }}"
servicePort: http
{{- end }}
{{- range .Values.ingress.hosts }}
- host: {{ .name }}
http:
paths:
- path: {{ default "/" .path }}
backend:
serviceName: "{{ template "wordpress.fullname" $ }}"
servicePort: http
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{ toYaml .Values.ingress.tls | indent 4 }}
{{- end }}
{{- end }}