[bitnami/mediawiki] Fix Mediawiki host when using ingress (#8239)

* [bitnami/mediawiki] Fix Mediawiki host when using ingress

* Apply suggestion

Co-authored-by: Miguel Ángel Cabrera Miñagorri <devgorri@gmail.com>

* Bump patch version

Co-authored-by: Miguel Ángel Cabrera Miñagorri <devgorri@gmail.com>
This commit is contained in:
Miguel Ruiz
2021-11-30 09:46:09 +01:00
committed by GitHub
parent 6e0499cce3
commit 0145dc9f54
2 changed files with 5 additions and 1 deletions

View File

@@ -32,4 +32,4 @@ name: mediawiki
sources:
- https://github.com/bitnami/bitnami-docker-mediawiki
- https://www.mediawiki.org/
version: 12.4.3
version: 12.4.4

View File

@@ -15,9 +15,13 @@ Note, returns 127.0.0.1 if using ClusterIP.
{{/*
Gets the host to be used for this application.
If not using ClusterIP, or if a host or LoadBalancerIP is not defined, the value will be empty.
When using Ingress, it will be set to the Ingress hostname.
*/}}
{{- define "mediawiki.host" -}}
{{- $host := index .Values (printf "%sHost" .Chart.Name) | default "" -}}
{{- if .Values.ingress.enabled }}
{{- $host := .Values.ingress.hostname | default "" -}}
{{- end -}}
{{- default (include "mediawiki.serviceIP" .) $host -}}
{{- end -}}