[bitnami/nginx] Ingress hostname dynamic tpl function (#32421)

* tpl the ingress hostname

Adding tpl function to ingress hostname to be able to dynamically assign the hostname field and match bitnami standards.

Signed-off-by: Koren Peretz <62677694+KorenP1@users.noreply.github.com>

* Version Bump

Version Bump

Signed-off-by: Koren Peretz <62677694+KorenP1@users.noreply.github.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* Update ingress.yaml

Signed-off-by: Koren Peretz <62677694+KorenP1@users.noreply.github.com>

* Update NOTES.txt

Signed-off-by: Koren Peretz <62677694+KorenP1@users.noreply.github.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>

* Update Chart.yaml

Signed-off-by: Koren Peretz <62677694+KorenP1@users.noreply.github.com>

* Update CHANGELOG.md

Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>

---------

Signed-off-by: Koren Peretz <62677694+KorenP1@users.noreply.github.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Bitnami Bot <bitnami.bot@broadcom.com>
Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com>
Co-authored-by: Bitnami Bot <bitnami.bot@broadcom.com>
This commit is contained in:
Koren Peretz
2025-04-02 11:29:35 +03:00
committed by GitHub
parent 6ebea1b37e
commit 4e232c32dc
4 changed files with 14 additions and 9 deletions

View File

@@ -1,8 +1,13 @@
# Changelog
## 19.0.3 (2025-03-21)
## 19.0.4 (2025-03-25)
* [bitnami/nginx] Add resources to git-clone-repository initcontainer ([#32530](https://github.com/bitnami/charts/pull/32530))
* [bitnami/nginx] Ingress hostname dynamic tpl function ([#32421](https://github.com/bitnami/charts/pull/32421))
## <small>19.0.3 (2025-03-25)</small>
* [bitnami/*] Add tanzuCategory annotation (#32409) ([a8fba5c](https://github.com/bitnami/charts/commit/a8fba5cb01f6f4464ca7f69c50b0fbe97d837a95)), closes [#32409](https://github.com/bitnami/charts/issues/32409)
* [bitnami/nginx] Add resources to git-clone-repository initcontainer (#32530) ([4c795a8](https://github.com/bitnami/charts/commit/4c795a8f58e03c85e1ca6ae278a2c0214d6f7b92)), closes [#32530](https://github.com/bitnami/charts/issues/32530)
## <small>19.0.2 (2025-03-12)</small>

View File

@@ -35,4 +35,4 @@ maintainers:
name: nginx
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/nginx
version: 19.0.3
version: 19.0.4

View File

@@ -36,8 +36,8 @@ To access NGINX from outside the cluster, follow the steps below:
1. Get the NGINX URL and associate its hostname to your cluster external IP:
export CLUSTER_IP=$(minikube ip) # On Minikube. Use: `kubectl cluster-info` on others K8s clusters
echo "NGINX URL: http{{ if .Values.ingress.tls }}s{{ end }}://{{ .Values.ingress.hostname }}"
echo "$CLUSTER_IP {{ .Values.ingress.hostname }}" | sudo tee -a /etc/hosts
echo "NGINX URL: http{{ if .Values.ingress.tls }}s{{ end }}://{{ tpl .Values.ingress.hostname . }}"
echo "$CLUSTER_IP {{ tpl .Values.ingress.hostname . }}" | sudo tee -a /etc/hosts
{{- else }}

View File

@@ -20,7 +20,7 @@ spec:
{{- end }}
rules:
{{- if .Values.ingress.hostname }}
- host: {{ .Values.ingress.hostname | quote }}
- host: {{ (tpl .Values.ingress.hostname .) | quote }}
http:
paths:
{{- if .Values.ingress.extraPaths }}
@@ -60,11 +60,11 @@ spec:
tls:
{{- if and .Values.ingress.tls (or (include "common.ingress.certManagerRequest" ( dict "annotations" .Values.ingress.annotations )) .Values.ingress.selfSigned (not (empty .Values.ingress.secrets))) }}
- hosts:
- {{ .Values.ingress.hostname | quote }}
{{- if and (or (.Values.ingress.tlsWwwPrefix) (eq (index .Values.ingress.annotations "nginx.ingress.kubernetes.io/from-to-www-redirect") "true" )) (not (contains "www." .Values.ingress.hostname)) }}
- {{ (tpl .Values.ingress.hostname .) | quote }}
{{- if and (or (.Values.ingress.tlsWwwPrefix) (eq (index .Values.ingress.annotations "nginx.ingress.kubernetes.io/from-to-www-redirect") "true" )) (not (contains "www." (tpl .Values.ingress.hostname .))) }}
- {{ printf "www.%s" (tpl .Values.ingress.hostname $) | quote }}
{{- end }}
secretName: {{ printf "%s-tls" .Values.ingress.hostname }}
secretName: {{ printf "%s-tls" (tpl .Values.ingress.hostname .) }}
{{- end }}
{{- if .Values.ingress.extraTls }}
{{- include "common.tplvalues.render" (dict "value" .Values.ingress.extraTls "context" $) | nindent 4 }}