From e7bdbc47223be63f7237d4b018066eeaeebc98ee Mon Sep 17 00:00:00 2001 From: elpadrinoIV Date: Thu, 7 Mar 2019 18:30:09 -0300 Subject: [PATCH] Added configuration for provider rfc2136 (see #11779) (#11781) * Added configuration for provider rfc2136 (see #11779) Signed-off-by: Nicolas Dascanio * [stable/external-dns] Incresed minor chart version (see #11779) Signed-off-by: Nicolas Dascanio --- stable/external-dns/Chart.yaml | 2 +- stable/external-dns/README.md | 9 +++++++- stable/external-dns/templates/deployment.yaml | 21 +++++++++++++++++++ stable/external-dns/templates/secret.yaml | 5 ++++- stable/external-dns/values.yaml | 11 +++++++++- 5 files changed, 44 insertions(+), 4 deletions(-) diff --git a/stable/external-dns/Chart.yaml b/stable/external-dns/Chart.yaml index 5fd512c3d7..dc95df07d3 100644 --- a/stable/external-dns/Chart.yaml +++ b/stable/external-dns/Chart.yaml @@ -3,7 +3,7 @@ description: | Configure external DNS servers (AWS Route53, Google CloudDNS and others) for Kubernetes Ingresses and Services name: external-dns -version: 1.6.2 +version: 1.7.0 appVersion: 0.5.9 home: https://github.com/kubernetes-incubator/external-dns sources: diff --git a/stable/external-dns/README.md b/stable/external-dns/README.md index ea26d80393..991b8dd866 100644 --- a/stable/external-dns/README.md +++ b/stable/external-dns/README.md @@ -61,11 +61,18 @@ The following table lists the configurable parameters of the external-dns chart | `infoblox.wapiVersion` | When using the Infoblox provider, optionally specify the Infoblox WAPI version. | `""` | | `infoblox.wapiConnectionPoolSize` | When using the Infoblox provider, optionally specify the Infoblox WAPI request connection pool size. | `""` | | `infoblox.wapiHttpTimeout` | When using the Infoblox provider, optionally specify the Infoblox WAPI request timeout in seconds. | `""` | +| `rfc2136.host` | When using the rfc2136 provider, specify the RFC2136 host. | `""` | +| `rfc2136.port` | When using the rfc2136 provider, optionally specify the RFC2136 port. | `53` | +| `rfc2136.zone` | When using the rfc2136 provider, specify the zone. | `""` | +| `rfc2136.tsigSecret` | When using the rfc2136 provider, if you want to enable security, specify the tsig secret. | `""` | +| `rfc2136.tsigKeyname` | When using the rfc2136 provider, if you want to enable security, specify the tsig keyname. If you want an insecure connection, disable this parameter. | `"externaldns-key"` | +| `rfc2136.tsigSecretAlg` | When using the rfc2136 provider, if you want to enable security, specify the tsig secret alg. | `"hmac-sha256"` | +| `rfc2136.tsigAxfr` | When using the rfc2136 provider, if you want to enable security, enable AFXR. | `true` | | `logLevel` | Verbosity of the logs (options: panic, debug, info, warn, error, fatal) | `info` | | `nodeSelector` | Node labels for pod assignment | `{}` | | `podAnnotations` | Additional annotations to apply to the pod. | `{}` | | `policy` | Modify how DNS records are sychronized between sources and providers (options: sync, upsert-only ). | `upsert-only` | -| `provider` | The DNS provider where the DNS records will be created (options: aws, google, azure, cloudflare, digitalocean, inmemory ). | `aws` | +| `provider` | The DNS provider where the DNS records will be created (options: aws, google, azure, cloudflare, digitalocean, inmemory, rfc2136 ). | `aws` | | `publishInternalServices` | Allow external-dns to publish DNS records for ClusterIP services (optional). | `false` | | `rbac.create` | If true, create & use RBAC resources | `false` | | `rbac.serviceAccountName` | Existing ServiceAccount to use (ignored if rbac.create=true) | `default` | diff --git a/stable/external-dns/templates/deployment.yaml b/stable/external-dns/templates/deployment.yaml index 42e890991c..5748851778 100755 --- a/stable/external-dns/templates/deployment.yaml +++ b/stable/external-dns/templates/deployment.yaml @@ -93,6 +93,20 @@ spec: - --infoblox-ssl-verify {{- end }} {{- end }} + {{- if eq .Values.provider "rfc2136" }} + - --rfc2136-host={{ required "rfc2136.host must be supplied for provider 'rfc2136'" .Values.rfc2136.host }} + - --rfc2136-port={{ .Values.rfc2136.port }} + - --rfc2136-zone={{ required "rfc2136.zone must be supplied for provider 'rfc2136'" .Values.rfc2136.zone }} + {{- if .Values.rfc2136.tsigKeyname }} + - --rfc2136-tsig-secret-alg={{ .Values.rfc2136.tsigSecretAlg }} + - --rfc2136-tsig-keyname={{ .Values.rfc2136.tsigKeyname }} + {{- if .Values.rfc2136.tsigAxfr }} + - --rfc2136-tsig-axfr + {{- end }} + {{- else }} + - --rfc2136-insecure=false + {{- end }} + {{- end }} volumeMounts: {{- if or .Values.google.serviceAccountSecret .Values.google.serviceAccountKey }} - name: google-service-account @@ -164,6 +178,13 @@ spec: name: {{ template "external-dns.fullname" . }} key: infoblox_wapi_password {{- end }} + {{- if and .Values.rfc2136.tsigSecret }} + - name: EXTERNAL_DNS_RFC2136_TSIG_SECRET + valueFrom: + secretKeyRef: + name: {{ template "external-dns.fullname" . }} + key: rfc2136_tsig_secret + {{- end }} {{- if and (eq .Values.provider "designate") .Values.designate.customCA.enabled }} - name: OPENSTACK_CA_FILE value: {{ .Values.designate.customCA.directory }}/{{ .Values.designate.customCA.filename }} diff --git a/stable/external-dns/templates/secret.yaml b/stable/external-dns/templates/secret.yaml index 4f5fbfbd2f..69275c40b9 100644 --- a/stable/external-dns/templates/secret.yaml +++ b/stable/external-dns/templates/secret.yaml @@ -1,4 +1,4 @@ -{{- if or (and .Values.aws.secretKey .Values.aws.accessKey) .Values.cloudflare.apiKey .Values.digitalocean.apiToken (and .Values.infoblox.wapiUsername .Values.infoblox.wapiPassword) .Values.extraEnv .Values.google.serviceAccountKey -}} +{{- if or (and .Values.aws.secretKey .Values.aws.accessKey) .Values.cloudflare.apiKey .Values.digitalocean.apiToken (and .Values.infoblox.wapiUsername .Values.infoblox.wapiPassword) .Values.rfc2136.tsigSecret .Values.extraEnv .Values.google.serviceAccountKey -}} apiVersion: v1 kind: Secret metadata: @@ -24,6 +24,9 @@ data: infoblox_wapi_username: {{ .Values.infoblox.wapiUsername | b64enc | quote }} infoblox_wapi_password: {{ .Values.infoblox.wapiPassword | b64enc | quote }} {{- end }} +{{- if .Values.rfc2136.tsigSecret }} + rfc2136_tsig_secret: {{ .Values.rfc2136.tsigSecret | b64enc | quote }} +{{- end }} {{- range .Values.extraEnv }} {{- if .value }} diff --git a/stable/external-dns/values.yaml b/stable/external-dns/values.yaml index 2a08cc99fd..6b22a85062 100644 --- a/stable/external-dns/values.yaml +++ b/stable/external-dns/values.yaml @@ -14,7 +14,7 @@ sources: # Allow external-dns to publish DNS records for ClusterIP services (optional) publishInternalServices: false -## The DNS provider where the DNS records will be created (options: aws, google, inmemory, azure ) +## The DNS provider where the DNS records will be created (options: aws, google, inmemory, azure, rfc2136 ) provider: aws # AWS Access keys to inject as environment variables @@ -75,6 +75,15 @@ infoblox: wapiConnectionPoolSize: "" wapiHttpTimeout: "" +rfc2136: + host: "" + port: 53 + zone: "" + tsigSecret: "" + tsigSecretAlg: hmac-sha256 + tsigKeyname: externaldns-key + tsigAxfr: true + ## Limit possible target zones by domain suffixes (optional) domainFilters: [] ## Limit possible target zones by zone id (optional)