Use ENV expansion for namespace in args (#7146)

Update the DaemonSet namespace references to use the `POD_NAMESPACE` environment variable in the same way that the Deployment does.
This commit is contained in:
Bill Cassidy 2021-06-27 17:09:24 -04:00 committed by GitHub
parent 91bcf54a25
commit f2509e4a3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -74,22 +74,22 @@ spec:
args: args:
- /nginx-ingress-controller - /nginx-ingress-controller
{{- if .Values.defaultBackend.enabled }} {{- if .Values.defaultBackend.enabled }}
- --default-backend-service={{ .Release.Namespace }}/{{ include "ingress-nginx.defaultBackend.fullname" . }} - --default-backend-service=$(POD_NAMESPACE)/{{ include "ingress-nginx.defaultBackend.fullname" . }}
{{- end }} {{- end }}
{{- if .Values.controller.publishService.enabled }} {{- if .Values.controller.publishService.enabled }}
- --publish-service={{ template "ingress-nginx.controller.publishServicePath" . }} - --publish-service={{ template "ingress-nginx.controller.publishServicePath" . }}
{{- end }} {{- end }}
- --election-id={{ .Values.controller.electionID }} - --election-id={{ .Values.controller.electionID }}
- --ingress-class={{ .Values.controller.ingressClass }} - --ingress-class={{ .Values.controller.ingressClass }}
- --configmap={{ .Release.Namespace }}/{{ include "ingress-nginx.controller.fullname" . }} - --configmap=$(POD_NAMESPACE)/{{ include "ingress-nginx.controller.fullname" . }}
{{- if .Values.tcp }} {{- if .Values.tcp }}
- --tcp-services-configmap={{ .Release.Namespace }}/{{ include "ingress-nginx.fullname" . }}-tcp - --tcp-services-configmap=$(POD_NAMESPACE)/{{ include "ingress-nginx.fullname" . }}-tcp
{{- end }} {{- end }}
{{- if .Values.udp }} {{- if .Values.udp }}
- --udp-services-configmap={{ .Release.Namespace }}/{{ include "ingress-nginx.fullname" . }}-udp - --udp-services-configmap=$(POD_NAMESPACE)/{{ include "ingress-nginx.fullname" . }}-udp
{{- end }} {{- end }}
{{- if .Values.controller.scope.enabled }} {{- if .Values.controller.scope.enabled }}
- --watch-namespace={{ default .Release.Namespace .Values.controller.scope.namespace }} - --watch-namespace={{ default "$(POD_NAMESPACE)" .Values.controller.scope.namespace }}
{{- end }} {{- end }}
{{- if and .Values.controller.reportNodeInternalIp .Values.controller.hostNetwork }} {{- if and .Values.controller.reportNodeInternalIp .Values.controller.hostNetwork }}
- --report-node-internal-ip-address={{ .Values.controller.reportNodeInternalIp }} - --report-node-internal-ip-address={{ .Values.controller.reportNodeInternalIp }}