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
213
213
{ {- end -} }
214
214
{ {- end -} }
215
215
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
+
216
230
{ {/*
217
231
Build the args for the service binary.
218
232
*/} }
@@ -314,7 +328,7 @@ Build the args for the service binary.
314
328
- -enable-external-dns={ { .Values.controller.enableExternalDNS } }
315
329
- -default-http-listener-port={ { .Values.controller.defaultHTTPListenerPort} }
316
330
- -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) } }
318
332
- -global-configuration=$(POD_NAMESPACE)/{ { include " nginx-ingress.controller.fullname" . } }
319
333
{ {- else } }
320
334
{ {- if .Values.controller.globalConfiguration.customName } }
Original file line number Diff line number Diff line change 2
2
apiVersion : k8s.nginx.org/v1
3
3
kind : GlobalConfiguration
4
4
metadata :
5
+ {{- if not .Values.controller.globalConfiguration.customName }}
5
6
name : {{ include "nginx-ingress.controller.fullname" . }}
6
7
namespace : {{ .Release.Namespace }}
8
+ {{- else }}
9
+ name : {{ include "nginx-ingress.globalConfiguration.customName" . }}
10
+ namespace : {{ include "nginx-ingress.globalConfiguration.customNamespace" . }}
11
+ {{- end }}
7
12
labels :
8
13
{{- include "nginx-ingress.labels" . | nindent 4 }}
9
14
spec :
You can’t perform that action at this time.
0 commit comments