diff --git a/charts/external-dns/templates/_helpers.tpl b/charts/external-dns/templates/_helpers.tpl index 4f70ccdd8c..265e93369b 100644 --- a/charts/external-dns/templates/_helpers.tpl +++ b/charts/external-dns/templates/_helpers.tpl @@ -68,5 +68,5 @@ Create the name of the service account to use The image to use */}} {{- define "external-dns.image" -}} -{{- printf "%s:%s" .Values.image.repository (default (printf "v%s" .Chart.AppVersion) .Values.image.tag) }} +{{- printf "%s:%s" .Values.image.repository (default ( .Chart.AppVersion) .Values.image.tag) }} {{- end }} diff --git a/charts/external-dns/templates/deployment.yaml b/charts/external-dns/templates/deployment.yaml index 0539b425bd..49736c414e 100644 --- a/charts/external-dns/templates/deployment.yaml +++ b/charts/external-dns/templates/deployment.yaml @@ -76,8 +76,12 @@ spec: {{- if .Values.awsPreferCname }} - --aws-prefer-cname {{- end }} - {{- if .Values.watchNamespaces }} - - --namespace={{ .Values.watchNamespaces | join "," }} + {{- if .Values.namespaced }} + {{- range .Values.watchNamespaces }} + - --namespace={{ . }} + {{- end }} + {{ else }} + - --namespace={{ .Release.Namespace }} {{- end }} {{- range .Values.sources }} - --source={{ . }} @@ -93,9 +97,6 @@ spec: {{- if and (eq .Values.txtPrefix "") (ne .Values.txtSuffix "") }} - --txt-suffix={{ .Values.txtSuffix }} {{- end }} - {{- if .Values.namespaced }} - - --namespace={{ .Release.Namespace }} - {{- end }} {{- range .Values.domainFilters }} - --domain-filter={{ . }} {{- end }}