From 61fc060c2637fda568c8b72b41b7a7e681663af7 Mon Sep 17 00:00:00 2001 From: Mark Hudnall Date: Sun, 13 Dec 2020 23:38:35 -0800 Subject: [PATCH] [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 --- bitnami/dokuwiki/Chart.yaml | 2 +- bitnami/dokuwiki/templates/ingress.yaml | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/bitnami/dokuwiki/Chart.yaml b/bitnami/dokuwiki/Chart.yaml index 154944bd5..3f737c023 100644 --- a/bitnami/dokuwiki/Chart.yaml +++ b/bitnami/dokuwiki/Chart.yaml @@ -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 diff --git a/bitnami/dokuwiki/templates/ingress.yaml b/bitnami/dokuwiki/templates/ingress.yaml index b6520bbeb..bea853003 100644 --- a/bitnami/dokuwiki/templates/ingress.yaml +++ b/bitnami/dokuwiki/templates/ingress.yaml @@ -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 }}