Skip to content

Commit ea0f025

Browse files
authored
fix: allow scope/tcp/udp configmap namespace to altered (#7161)
1 parent 62f9dc9 commit ea0f025

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

charts/ingress-nginx/templates/controller-daemonset.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@ spec:
8181
{{- end }}
8282
- --election-id={{ .Values.controller.electionID }}
8383
- --ingress-class={{ .Values.controller.ingressClass }}
84-
- --configmap=$(POD_NAMESPACE)/{{ include "ingress-nginx.controller.fullname" . }}
84+
- --configmap={{ default "$(POD_NAMESPACE)" .Values.controller.configMapNamespace }}/{{ include "ingress-nginx.controller.fullname" . }}
8585
{{- if .Values.tcp }}
86-
- --tcp-services-configmap=$(POD_NAMESPACE)/{{ include "ingress-nginx.fullname" . }}-tcp
86+
- --tcp-services-configmap={{ default "$(POD_NAMESPACE)" .Values.controller.tcp.configMapNamespace }}/{{ include "ingress-nginx.fullname" . }}-tcp
8787
{{- end }}
8888
{{- if .Values.udp }}
89-
- --udp-services-configmap=$(POD_NAMESPACE)/{{ include "ingress-nginx.fullname" . }}-udp
89+
- --udp-services-configmap={{ default "$(POD_NAMESPACE)" .Values.controller.udp.configMapNamespace }}/{{ include "ingress-nginx.fullname" . }}-udp
9090
{{- end }}
9191
{{- if .Values.controller.scope.enabled }}
9292
- --watch-namespace={{ default "$(POD_NAMESPACE)" .Values.controller.scope.namespace }}

charts/ingress-nginx/templates/controller-deployment.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,12 @@ spec:
8585
{{- end }}
8686
- --election-id={{ .Values.controller.electionID }}
8787
- --ingress-class={{ .Values.controller.ingressClass }}
88-
- --configmap=$(POD_NAMESPACE)/{{ include "ingress-nginx.controller.fullname" . }}
88+
- --configmap={{ default "$(POD_NAMESPACE)" .Values.controller.configMapNamespace }}/{{ include "ingress-nginx.controller.fullname" . }}
8989
{{- if .Values.tcp }}
90-
- --tcp-services-configmap=$(POD_NAMESPACE)/{{ include "ingress-nginx.fullname" . }}-tcp
90+
- --tcp-services-configmap={{ default "$(POD_NAMESPACE)" .Values.controller.tcp.configMapNamespace }}/{{ include "ingress-nginx.fullname" . }}-tcp
9191
{{- end }}
9292
{{- if .Values.udp }}
93-
- --udp-services-configmap=$(POD_NAMESPACE)/{{ include "ingress-nginx.fullname" . }}-udp
93+
- --udp-services-configmap={{ default "$(POD_NAMESPACE)" .Values.controller.udp.configMapNamespace }}/{{ include "ingress-nginx.fullname" . }}-udp
9494
{{- end }}
9595
{{- if .Values.controller.scope.enabled }}
9696
- --watch-namespace={{ default "$(POD_NAMESPACE)" .Values.controller.scope.namespace }}

charts/ingress-nginx/values.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -121,23 +121,23 @@ controller:
121121
##
122122
scope:
123123
enabled: false
124-
namespace: "" # defaults to .Release.Namespace
124+
namespace: "" # defaults to $(POD_NAMESPACE)
125125

126126
## Allows customization of the configmap / nginx-configmap namespace
127127
##
128-
configMapNamespace: "" # defaults to .Release.Namespace
128+
configMapNamespace: "" # defaults to $(POD_NAMESPACE)
129129

130130
## Allows customization of the tcp-services-configmap
131131
##
132132
tcp:
133-
configMapNamespace: "" # defaults to .Release.Namespace
133+
configMapNamespace: "" # defaults to $(POD_NAMESPACE)
134134
## Annotations to be added to the tcp config configmap
135135
annotations: {}
136136

137137
## Allows customization of the udp-services-configmap
138138
##
139139
udp:
140-
configMapNamespace: "" # defaults to .Release.Namespace
140+
configMapNamespace: "" # defaults to $(POD_NAMESPACE)
141141
## Annotations to be added to the udp config configmap
142142
annotations: {}
143143

0 commit comments

Comments
 (0)