From 265de88a7ae8cff75807362ad61f5d6bd394e4e2 Mon Sep 17 00:00:00 2001 From: rahtr <31742059+rahtr@users.noreply.github.com> Date: Tue, 8 Aug 2023 09:28:06 -0400 Subject: [PATCH] Merged namespaced and watchNamespace configuration (#8) --------- Co-authored-by: Adrian <1664229+azun@users.noreply.github.com> --- charts/external-dns/Chart.yaml | 2 +- charts/external-dns/templates/_helpers.tpl | 2 +- charts/external-dns/templates/deployment.yaml | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/charts/external-dns/Chart.yaml b/charts/external-dns/Chart.yaml index 9aac5f3078..60f80d1913 100644 --- a/charts/external-dns/Chart.yaml +++ b/charts/external-dns/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: external-dns description: ExternalDNS synchronizes exposed Kubernetes Services and Ingresses with DNS providers. type: application -version: 1.13.0-20230727-1700-adobe +version: 1.13.0-20230808-0900-adobe appVersion: 0.13.5-20230727-1700-adobe keywords: - kubernetes 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..647d788909 100644 --- a/charts/external-dns/templates/deployment.yaml +++ b/charts/external-dns/templates/deployment.yaml @@ -76,8 +76,13 @@ spec: {{- if .Values.awsPreferCname }} - --aws-prefer-cname {{- end }} + {{- if or .Values.namespaced .Values.watchNamespaces }} {{- if .Values.watchNamespaces }} - --namespace={{ .Values.watchNamespaces | join "," }} + {{- else }} + - --namespace={{ .Release.Namespace }} + {{- end }} + {{- end }} {{- end }} {{- range .Values.sources }} - --source={{ . }} @@ -93,9 +98,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 }}