[bitnami/external-dns] add parameters for OVH authentication (#2293)

* add vars for OVH authentication

* delete duplicated line

* Bump version

* Bump minor version

* [bitnami/external-dns] Update components versions

Signed-off-by: Bitnami Containers <containers@bitnami.com>

Co-authored-by: Miguel Ángel Cabrera Miñagorri <macabrera@bitnami.com>
Co-authored-by: Bitnami Containers <containers@bitnami.com>
This commit is contained in:
Julien GAILLARDET
2020-04-16 20:35:35 +02:00
committed by GitHub
parent 693978d6f2
commit 301eda6ded
7 changed files with 90 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
apiVersion: v1
name: external-dns
version: 2.20.15
version: 2.21.0
appVersion: 0.7.1
description: ExternalDNS is a Kubernetes addon that configures public DNS servers with information about exposed Kubernetes services to make them discoverable.
keywords:

View File

@@ -112,6 +112,9 @@ The following table lists the configurable parameters of the external-dns chart
| `google.serviceAccountSecret` | When using the Google provider, specify the existing secret which contains credentials.json (optional) | `""` |
| `google.serviceAccountSecretKey` | When using the Google provider with an existing secret, specify the key name (optional) | `"credentials.json"` |
| `google.serviceAccountKey` | When using the Google provider, specify the service account key JSON file. (required when `google.serviceAccountSecret` is not provided. In this case a new secret will be created holding this service account | `""` |
| `ovh.consumerKey` | When using the OVH provider, specify the existing consumer key. (required when provider=ovh) | `""` |
| `ovh.applicationKey` | When using the OVH provider with an existing application, specify the application key. (required when provider=ovh) | `""` |
| `ovh.applicationSecret` | When using the OVH provider with an existing application, specify the application secret. (required when provider=ovh) | `""` |
| `infoblox.gridHost` | When using the Infoblox provider, specify the Infoblox Grid host (required when provider=infoblox) | `""` |
| `infoblox.wapiUsername` | When using the Infoblox provider, specify the Infoblox WAPI username | `"admin"` |
| `infoblox.wapiPassword` | When using the Infoblox provider, specify the Infoblox WAPI password (required when provider=infoblox) | `""` |

View File

@@ -136,6 +136,8 @@ Return true if a secret object should be created
{{- true -}}
{{- else if and (eq .Values.provider "transip") .Values.transip.apiKey -}}
{{- true -}}
{{- else if and (eq .Values.provider "ovh") .Values.ovh.consumerKey -}}
{{- true -}}
{{- else -}}
{{- end -}}
{{- end -}}
@@ -215,6 +217,9 @@ Compile all warnings into a single message, and call fail.
{{- $messages := append $messages (include "external-dns.validateValues.azurePrivateDns.useManagedIdentityExtensionNotSupported" .) -}}
{{- $messages := append $messages (include "external-dns.validateValues.transip.account" .) -}}
{{- $messages := append $messages (include "external-dns.validateValues.transip.apiKey" .) -}}
{{- $messages := append $messages (include "external-dns.validateValues.ovh.consumerKey" .) -}}
{{- $messages := append $messages (include "external-dns.validateValues.ovh.applicationKey" .) -}}
{{- $messages := append $messages (include "external-dns.validateValues.ovh.applicationSecret" .) -}}
{{- $messages := without $messages "" -}}
{{- $message := join "\n" $messages -}}
@@ -511,6 +516,42 @@ external-dns: transip.apiKey
{{- end -}}
{{- end -}}
{{/*
Validate values of External DNS:
- must provide the OVH consumer key when provider is "ovh"
*/}}
{{- define "external-dns.validateValues.ovh.consumerKey" -}}
{{- if and (eq .Values.provider "ovh") (not .Values.ovh.consumerKey) -}}
external-dns: ovh.consumerKey
You must provide the OVH consumer key when provider="ovh".
Please set the consumerKey parameter (--set ovh.consumerKey="xxxx")
{{- end -}}
{{- end -}}
{{/*
Validate values of External DNS:
- must provide the OVH application key when provider is "ovh"
*/}}
{{- define "external-dns.validateValues.ovh.applicationKey" -}}
{{- if and (eq .Values.provider "ovh") (not .Values.ovh.applicationKey) -}}
external-dns: ovh.applicationKey
You must provide the OVH appliciation key when provider="ovh".
Please set the applicationKey parameter (--set ovh.applicationKey="xxxx")
{{- end -}}
{{- end -}}
{{/*
Validate values of External DNS:
- must provide the OVH application secret when provider is "ovh"
*/}}
{{- define "external-dns.validateValues.ovh.applicationSecret" -}}
{{- if and (eq .Values.provider "ovh") (not .Values.ovh.applicationSecret) -}}
external-dns: ovh.applicationSecret
You must provide the OVH appliciation secret key when provider="ovh".
Please set the applicationSecret parameter (--set ovh.applicationSecret="xxxx")
{{- end -}}
{{- end -}}
{/*
Return the ExternalDNS service account name
*/}}

View File

@@ -326,6 +326,30 @@ spec:
value: /etc/secrets/service-account/credentials.json
{{- end }}
{{- end }}
{{- if eq .Values.provider "ovh" }}
# OVH environment variables
{{- if .Values.ovh.consumerKey }}
- name: OVH_CONSUMER_KEY
valueFrom:
secretKeyRef:
name: {{ template "external-dns.secretName" . }}
key: ovh_consumer_key
{{- end }}
{{- if .Values.ovh.applicationKey }}
- name: OVH_APPLICATION_KEY
valueFrom:
secretKeyRef:
name: {{ template "external-dns.secretName" . }}
key: ovh_application_key
{{- end }}
{{- if .Values.ovh.applicationSecret }}
- name: OVH_APPLICATION_SECRET
valueFrom:
secretKeyRef:
name: {{ template "external-dns.secretName" . }}
key: ovh_application_secret
{{- end }}
{{- end }}
{{- if eq .Values.provider "infoblox" }}
# Infloblox environment variables
{{- if .Values.infoblox.wapiConnectionPoolSize }}

View File

@@ -53,4 +53,9 @@ data:
{{- if eq .Values.provider "transip" }}
transip-api-key: {{ .Values.transip.apiKey | b64enc | quote }}
{{- end }}
{{- if eq .Values.provider "ovh" }}
ovh_consumer_key: {{ .Values.ovh.consumerKey | b64enc | quote }}
ovh_application_key: {{ .Values.ovh.applicationKey | b64enc | quote }}
ovh_application_secret: {{ .Values.ovh.applicationSecret | b64enc | quote }}
{{- end }}
{{- end }}

View File

@@ -13,7 +13,7 @@
image:
registry: docker.io
repository: bitnami/external-dns
tag: 0.7.1-debian-10-r17
tag: 0.7.1-debian-10-r19
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
@@ -249,6 +249,13 @@ google:
serviceAccountSecretKey: "credentials.json"
serviceAccountKey: ""
## OVH configuration to be set via arguments/env. variables
##
ovh:
consumerKey: ""
applicationKey: ""
applicationSecret: ""
## Infoblox configuration to be set via arguments/env. variables
##
infoblox:

View File

@@ -13,7 +13,7 @@
image:
registry: docker.io
repository: bitnami/external-dns
tag: 0.7.1-debian-10-r17
tag: 0.7.1-debian-10-r19
## Specify a imagePullPolicy
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
@@ -265,6 +265,13 @@ infoblox:
wapiConnectionPoolSize: ""
wapiHttpTimeout: ""
## OVH configuration to be set via arguments/env. variables
##
ovh:
consumerKey: ""
applicationKey: ""
applicationSecret: ""
## RFC 2136 configuration to be set via arguments/env. variables
##
rfc2136: