File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed
charts/nginx-ingress/templates Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -213,6 +213,20 @@ false
213213{ {- end -} }
214214{ {- end -} }
215215
216+ { {/*
217+ Create the global configuration custom name from the globalConfiguration.customName value.
218+ */} }
219+ { {- define " nginx-ingress.globalConfiguration.customName" -} }
220+ { { splitList " /" .Values.controller.globalConfiguration.customName | last } }
221+ { {- end -} }
222+
223+ { {/*
224+ Create the global configuration custom namespace from the globalConfiguration.customName value.
225+ */} }
226+ { {- define " nginx-ingress.globalConfiguration.customNamespace" -} }
227+ { { splitList " /" .Values.controller.globalConfiguration.customName | first } }
228+ { {- end -} }
229+
216230{ {/*
217231Build the args for the service binary.
218232*/} }
@@ -314,7 +328,7 @@ Build the args for the service binary.
314328- -enable-external-dns={ { .Values.controller.enableExternalDNS } }
315329- -default-http-listener-port={ { .Values.controller.defaultHTTPListenerPort} }
316330- -default-https-listener-port={ { .Values.controller.defaultHTTPSListenerPort} }
317- { {- if .Values.controller.globalConfiguration.create } }
331+ { {- if and .Values.controller.globalConfiguration.create ( not .Values.controller.globalConfiguration.customName) } }
318332- -global-configuration=$(POD_NAMESPACE)/{ { include " nginx-ingress.controller.fullname" . } }
319333{ {- else } }
320334{ {- if .Values.controller.globalConfiguration.customName } }
Original file line number Diff line number Diff line change 22apiVersion : k8s.nginx.org/v1
33kind : GlobalConfiguration
44metadata :
5+ {{- if not .Values.controller.globalConfiguration.customName }}
56 name : {{ include "nginx-ingress.controller.fullname" . }}
67 namespace : {{ .Release.Namespace }}
8+ {{- else }}
9+ name : {{ include "nginx-ingress.globalConfiguration.customName" . }}
10+ namespace : {{ include "nginx-ingress.globalConfiguration.customNamespace" . }}
11+ {{- end }}
712 labels :
813 {{- include "nginx-ingress.labels" . | nindent 4 }}
914spec :
You can’t perform that action at this time.
0 commit comments