[bitnami/dokuwiki] Fix multiple ingress hosts (#4707)

Previously, when attempting to use multiple ingress hosts, only the last ingress was created.
This was because the template was appending a resource template with the same name,
causing only the last one to be enabled.

Iteration has been moved inside the resource template to fix this issue and support
multiple ingress hosts.

Fixes #4618
This commit is contained in:
Mark Hudnall
2020-12-14 08:38:35 +01:00
committed by GitHub
parent 1046289832
commit 61fc060c26
2 changed files with 13 additions and 6 deletions
+1 -1
View File
@@ -24,4 +24,4 @@ name: dokuwiki
sources:
- https://github.com/bitnami/bitnami-docker-dokuwiki
- http://www.dokuwiki.org/
version: 10.0.2
version: 10.0.3
+12 -5
View File
@@ -1,5 +1,4 @@
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
@@ -23,6 +22,11 @@ metadata:
{{- end }}
spec:
rules:
{{- $tls := false }}
{{- range .Values.ingress.hosts }}
{{- if .tls }}
{{- $tls = true }}
{{- end }}
- host: {{ .name }}
http:
paths:
@@ -30,12 +34,15 @@ spec:
backend:
serviceName: {{ template "dokuwiki.fullname" $ }}
servicePort: 80
{{- if .tls }}
{{- end }}
{{- if $tls }}
tls:
{{- range .Values.ingress.hosts }}
{{- if .tls }}
- hosts:
- {{ .name }}
secretName: {{ .tlsSecret }}
{{- end }}
---
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}