Helpers: Align ingress-nginx.namespace to ingress-nginx.name.

This commit is contained in:
Marco Ebert 2023-10-25 14:31:34 +02:00 committed by k8s-infra-cherrypick-robot
parent af04aa5fa9
commit 78ffac9766

View file

@ -31,17 +31,13 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- end -}} {{- 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" -}} {{- define "ingress-nginx.namespace" -}}
{{- if .Values.namespaceOverride -}} {{- default .Release.Namespace .Values.namespaceOverride | trunc 63 | trimSuffix "-" -}}
{{- .Values.namespaceOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- .Release.Namespace -}}
{{- end -}}
{{- end -}} {{- end -}}
{{/* {{/*
Container SecurityContext. Container SecurityContext.
*/}} */}}
@ -113,7 +109,6 @@ By convention this will simply use the <namespace>/<controller-name> to match th
service generated. service generated.
Users can provide an override for an explicit service they want bound via `.Values.controller.publishService.pathOverride` Users can provide an override for an explicit service they want bound via `.Values.controller.publishService.pathOverride`
*/}} */}}
{{- define "ingress-nginx.controller.publishServicePath" -}} {{- define "ingress-nginx.controller.publishServicePath" -}}
{{- $defServiceName := printf "%s/%s" "$(POD_NAMESPACE)" (include "ingress-nginx.controller.fullname" .) -}} {{- $defServiceName := printf "%s/%s" "$(POD_NAMESPACE)" (include "ingress-nginx.controller.fullname" .) -}}