From 9e25dbb5d5ceeab3e70a7fe8ba49784bc00a2129 Mon Sep 17 00:00:00 2001 From: Valentin Delaye Date: Mon, 27 Mar 2023 07:08:21 +0200 Subject: [PATCH] Add exoscale external dns values Signed-off-by: Valentin Delaye --- bitnami/external-dns/Chart.yaml | 2 +- bitnami/external-dns/README.md | 3 +++ bitnami/external-dns/templates/_helpers.tpl | 4 ++++ bitnami/external-dns/templates/dep-ds.yaml | 17 +++++++++++++++++ bitnami/external-dns/templates/secret.yaml | 4 ++++ bitnami/external-dns/values.yaml | 15 +++++++++++++++ 6 files changed, 44 insertions(+), 1 deletion(-) diff --git a/bitnami/external-dns/Chart.yaml b/bitnami/external-dns/Chart.yaml index 6f59913b7e512d..d51068056995ab 100644 --- a/bitnami/external-dns/Chart.yaml +++ b/bitnami/external-dns/Chart.yaml @@ -24,4 +24,4 @@ sources: - https://github.com/kubernetes-sigs/external-dns - https://github.com/bitnami/containers/tree/main/bitnami/external-dns - https://github.com/kubernetes-sigs/external-dns -version: 6.15.1 +version: 6.16.0 diff --git a/bitnami/external-dns/README.md b/bitnami/external-dns/README.md index 57c9b0f1807e48..d830a86369080d 100755 --- a/bitnami/external-dns/README.md +++ b/bitnami/external-dns/README.md @@ -163,6 +163,9 @@ The command removes all the Kubernetes components associated with the chart and | `designate.customCA.content` | When using the Designate provider, set the content of the custom CA | `""` | | `designate.customCA.mountPath` | When using the Designate provider, set the mountPath in which to mount the custom CA configuration | `/config/designate` | | `designate.customCA.filename` | When using the Designate provider, set the custom CA configuration filename | `designate-ca.pem` | +| `exoscale.apiKey` | When using the Exoscale provider, `EXTERNAL_DNS_EXOSCALE_APIKEY` to set (optional) | `""` | +| `exoscale.apiToken` | When using the Exoscale provider, `EXTERNAL_DNS_EXOSCALE_APISECRET` to set (optional) | `""` | +| `exoscale.secretName` | Use an existing secret with keys "exoscale_api_key" and "exoscale_api_token" defined. | `""` | | `digitalocean.apiToken` | When using the DigitalOcean provider, `DO_TOKEN` to set (optional) | `""` | | `digitalocean.secretName` | Use an existing secret with key "digitalocean_api_token" defined. | `""` | | `google.project` | When using the Google provider, specify the Google project (required when provider=google) | `""` | diff --git a/bitnami/external-dns/templates/_helpers.tpl b/bitnami/external-dns/templates/_helpers.tpl index 908a546d0f3d68..dd4c05904c25e0 100644 --- a/bitnami/external-dns/templates/_helpers.tpl +++ b/bitnami/external-dns/templates/_helpers.tpl @@ -114,6 +114,8 @@ Return true if a secret object should be created {{- true -}} {{- else if and (eq .Values.provider "digitalocean") .Values.digitalocean.apiToken (not .Values.digitalocean.secretName) -}} {{- true -}} +{{- else if and (eq .Values.provider "exoscale") .Values.exoscale.apiKey (not .Values.exoscale.secretName) -}} + {{- true -}} {{- else if and (eq .Values.provider "google") .Values.google.serviceAccountKey (not .Values.google.serviceAccountSecret) -}} {{- true -}} {{- else if and (eq .Values.provider "hetzner") .Values.hetzner.token (not .Values.hetzner.secretName) -}} @@ -170,6 +172,8 @@ Return the name of the Secret used to store the passwords {{- .Values.cloudflare.secretName }} {{- else if and (eq .Values.provider "digitalocean") .Values.digitalocean.secretName }} {{- .Values.digitalocean.secretName }} +{{- else if and (eq .Values.provider "exoscale") .Values.exoscale.secretName }} +{{- .Values.exoscale.secretName }} {{- else if and (eq .Values.provider "google") .Values.google.serviceAccountSecret }} {{- .Values.google.serviceAccountSecret }} {{- else if and (eq .Values.provider "hetzner") .Values.hetzner.secretName }} diff --git a/bitnami/external-dns/templates/dep-ds.yaml b/bitnami/external-dns/templates/dep-ds.yaml index f8eceea0c8a2d6..cc937cb6420bd0 100755 --- a/bitnami/external-dns/templates/dep-ds.yaml +++ b/bitnami/external-dns/templates/dep-ds.yaml @@ -444,6 +444,23 @@ spec: name: {{ template "external-dns.secretName" . }} key: digitalocean_api_token {{- end }} + {{- if (eq .Values.provider "exoscale") }} + # Exoscale environment variables + {{- if (or .Values.exoscale.apiKey .Values.exoscale.secretName) }} + - name: EXTERNAL_DNS_EXOSCALE_APIKEY + valueFrom: + secretKeyRef: + name: {{ template "external-dns.secretName" . }} + key: exoscale_api_key + {{- end }} + {{- if (or .Values.exoscale.apiToken .Values.exoscale.secretName) }} + - name: EXTERNAL_DNS_EXOSCALE_APISECRET + valueFrom: + secretKeyRef: + name: {{ template "external-dns.secretName" . }} + key: exoscale_api_token + {{- end }} + {{- end }} {{- if eq .Values.provider "google" }} # Google environment variables {{- if or .Values.google.serviceAccountSecret .Values.google.serviceAccountKey }} diff --git a/bitnami/external-dns/templates/secret.yaml b/bitnami/external-dns/templates/secret.yaml index 7536c336db2f0c..389583ca8944ed 100644 --- a/bitnami/external-dns/templates/secret.yaml +++ b/bitnami/external-dns/templates/secret.yaml @@ -62,6 +62,10 @@ data: {{- if eq .Values.provider "digitalocean" }} digitalocean_api_token: {{ .Values.digitalocean.apiToken | b64enc | quote }} {{- end }} + {{- if eq .Values.provider "exoscale" }} + exoscale_api_key: {{ .Values.exoscale.apiKey | b64enc | quote }} + exoscale_api_token: {{ .Values.exoscale.apiToken | b64enc | quote }} + {{- end }} {{- if eq .Values.provider "infoblox" }} infoblox_wapi_username: {{ .Values.infoblox.wapiUsername | b64enc | quote }} infoblox_wapi_password: {{ .Values.infoblox.wapiPassword | b64enc | quote }} diff --git a/bitnami/external-dns/values.yaml b/bitnami/external-dns/values.yaml index 3d8b7cc09ee7ba..d4d8ef8bafd867 100644 --- a/bitnami/external-dns/values.yaml +++ b/bitnami/external-dns/values.yaml @@ -382,6 +382,21 @@ designate: content: "" mountPath: "/config/designate" filename: "designate-ca.pem" +## Exoscale configuration to be set via arguments/env. variables +## +exoscale: + ## @param exoscale.apiKey When using the Exoscale provider, `EXTERNAL_DNS_EXOSCALE_APIKEY` to set (optional) + ## + apiKey: "" + ## @param exoscale.apiToken When using the Exoscale provider, `EXTERNAL_DNS_EXOSCALE_APISECRET` to set (optional) + ## + apiToken: "" + ## @param exoscale.secretName Use an existing secret with keys "exoscale_api_key" and "exoscale_api_token" defined. + ## This ignores exoscale.apiKey and exoscale.apiToken + ## + secretName: "" +## Google configuration to be set via arguments/env. variables +## ## DigitalOcean configuration to be set via arguments/env. variables ## digitalocean: