From 78ffac97666fe7ecd72067378e491e27255746d6 Mon Sep 17 00:00:00 2001 From: Marco Ebert Date: Wed, 25 Oct 2023 14:31:34 +0200 Subject: [PATCH] Helpers: Align `ingress-nginx.namespace` to `ingress-nginx.name`. --- charts/ingress-nginx/templates/_helpers.tpl | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/charts/ingress-nginx/templates/_helpers.tpl b/charts/ingress-nginx/templates/_helpers.tpl index 17235dc5b..3d9b2011a 100644 --- a/charts/ingress-nginx/templates/_helpers.tpl +++ b/charts/ingress-nginx/templates/_helpers.tpl @@ -31,17 +31,13 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this {{- end -}} {{/* -Allow the release namespace to be overridden for multi-namespace deployments in combined charts +Expand the namespace of the release. +Allows overriding it for multi-namespace deployments in combined charts. */}} {{- define "ingress-nginx.namespace" -}} - {{- if .Values.namespaceOverride -}} - {{- .Values.namespaceOverride | trunc 63 | trimSuffix "-" -}} - {{- else -}} - {{- .Release.Namespace -}} - {{- end -}} +{{- default .Release.Namespace .Values.namespaceOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} - {{/* Container SecurityContext. */}} @@ -113,7 +109,6 @@ By convention this will simply use the / to match th service generated. Users can provide an override for an explicit service they want bound via `.Values.controller.publishService.pathOverride` - */}} {{- define "ingress-nginx.controller.publishServicePath" -}} {{- $defServiceName := printf "%s/%s" "$(POD_NAMESPACE)" (include "ingress-nginx.controller.fullname" .) -}}