Commit 6ed67738 by gitlawr Committed by Craig Jellick

Add configurations for alibabacloud provider to external-dns

parent 35649121
......@@ -45,6 +45,10 @@ region = {{ .Values.aws.region }}
source_profile = default
{{ end }}
{{- define "external-dns.alibabacloud-config" }}
accessKeyId: {{ .Values.alibabacloud.accessKey }}
accessKeySecret: {{ .Values.alibabacloud.secretKey }}
{{ end }}
{{- define "system_default_registry" -}}
{{- if .Values.global.systemDefaultRegistry -}}
......
......@@ -94,6 +94,12 @@ spec:
- --infoblox-ssl-verify
{{- end }}
{{- end }}
{{- if eq .Values.provider "alibabacloud" }}
- --alibaba-cloud-config-file=/etc/kubernetes/config.yaml
{{- end }}
{{- if .Values.alibabacloud.zoneType }}
- --alibaba-cloud-zone-type={{ .Values.alibabacloud.zoneType }}
{{- end }}
volumeMounts:
{{- if or .Values.google.serviceAccountSecret .Values.google.serviceAccountKey }}
- name: google-service-account
......@@ -118,6 +124,14 @@ spec:
mountPath: {{ .Values.designate.customCA.directory }}
readOnly: true
{{- end }}
{{- if eq .Values.provider "alibabacloud" }}
- name: alibaba-cloud-config-file
mountPath: /etc/kubernetes/
readOnly: true
- mountPath: /usr/share/zoneinfo
name: zoneinfo
readOnly: true
{{- end }}
env:
{{- if or .Values.google.serviceAccountSecret .Values.google.serviceAccountKey }}
- name: GOOGLE_APPLICATION_CREDENTIALS
......@@ -222,6 +236,14 @@ spec:
- key: {{ .Values.designate.customCA.filename }}
path: {{ .Values.designate.customCA.filename }}
{{- end }}
{{- if eq .Values.provider "alibabacloud" }}
- name: alibaba-cloud-config-file
secret:
secretName: {{ template "external-dns.fullname" . }}
- name: zoneinfo
hostPath:
path: /usr/share/zoneinfo
{{- end }}
nodeSelector:
beta.kubernetes.io/os: linux
{{- if .Values.nodeSelector }}
......
{{- if or (and .Values.aws.secretKey .Values.aws.accessKey) .Values.cloudflare.apiKey (and .Values.infoblox.wapiUsername .Values.infoblox.wapiPassword) .Values.extraEnv .Values.google.serviceAccountKey -}}
{{- if or (and .Values.aws.secretKey .Values.aws.accessKey) .Values.cloudflare.apiKey (and .Values.infoblox.wapiUsername .Values.infoblox.wapiPassword) .Values.extraEnv .Values.google.serviceAccountKey (and .Values.alibabacloud.secretKey .Values.alibabacloud.accessKey) -}}
apiVersion: v1
kind: Secret
metadata:
......@@ -21,6 +21,9 @@ data:
infoblox_wapi_username: {{ .Values.infoblox.wapiUsername | b64enc | quote }}
infoblox_wapi_password: {{ .Values.infoblox.wapiPassword | b64enc | quote }}
{{- end }}
{{- if eq .Values.provider "alibabacloud" }}
config.yaml: {{ include "external-dns.alibabacloud-config" . | b64enc | quote }}
{{- end}}
{{- range .Values.extraEnv }}
{{- if .value }}
......
......@@ -14,9 +14,16 @@ 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, alibabacloud )
provider: aws
# Configurations for Alibabacloud provider
alibabacloud:
accessKey: ""
secretKey: ""
# Filter for zones of this type (optional, options: public, private or no value for both)
zoneType: ""
# AWS Access keys to inject as environment variables
aws:
secretKey: ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment