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 }} ...@@ -45,6 +45,10 @@ region = {{ .Values.aws.region }}
source_profile = default source_profile = default
{{ end }} {{ end }}
{{- define "external-dns.alibabacloud-config" }}
accessKeyId: {{ .Values.alibabacloud.accessKey }}
accessKeySecret: {{ .Values.alibabacloud.secretKey }}
{{ end }}
{{- define "system_default_registry" -}} {{- define "system_default_registry" -}}
{{- if .Values.global.systemDefaultRegistry -}} {{- if .Values.global.systemDefaultRegistry -}}
......
...@@ -94,6 +94,12 @@ spec: ...@@ -94,6 +94,12 @@ spec:
- --infoblox-ssl-verify - --infoblox-ssl-verify
{{- end }} {{- end }}
{{- 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: volumeMounts:
{{- if or .Values.google.serviceAccountSecret .Values.google.serviceAccountKey }} {{- if or .Values.google.serviceAccountSecret .Values.google.serviceAccountKey }}
- name: google-service-account - name: google-service-account
...@@ -118,6 +124,14 @@ spec: ...@@ -118,6 +124,14 @@ spec:
mountPath: {{ .Values.designate.customCA.directory }} mountPath: {{ .Values.designate.customCA.directory }}
readOnly: true readOnly: true
{{- end }} {{- 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: env:
{{- if or .Values.google.serviceAccountSecret .Values.google.serviceAccountKey }} {{- if or .Values.google.serviceAccountSecret .Values.google.serviceAccountKey }}
- name: GOOGLE_APPLICATION_CREDENTIALS - name: GOOGLE_APPLICATION_CREDENTIALS
...@@ -222,6 +236,14 @@ spec: ...@@ -222,6 +236,14 @@ spec:
- key: {{ .Values.designate.customCA.filename }} - key: {{ .Values.designate.customCA.filename }}
path: {{ .Values.designate.customCA.filename }} path: {{ .Values.designate.customCA.filename }}
{{- end }} {{- 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: nodeSelector:
beta.kubernetes.io/os: linux beta.kubernetes.io/os: linux
{{- if .Values.nodeSelector }} {{- 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 apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
...@@ -21,6 +21,9 @@ data: ...@@ -21,6 +21,9 @@ data:
infoblox_wapi_username: {{ .Values.infoblox.wapiUsername | b64enc | quote }} infoblox_wapi_username: {{ .Values.infoblox.wapiUsername | b64enc | quote }}
infoblox_wapi_password: {{ .Values.infoblox.wapiPassword | b64enc | quote }} infoblox_wapi_password: {{ .Values.infoblox.wapiPassword | b64enc | quote }}
{{- end }} {{- end }}
{{- if eq .Values.provider "alibabacloud" }}
config.yaml: {{ include "external-dns.alibabacloud-config" . | b64enc | quote }}
{{- end}}
{{- range .Values.extraEnv }} {{- range .Values.extraEnv }}
{{- if .value }} {{- if .value }}
......
...@@ -14,9 +14,16 @@ sources: ...@@ -14,9 +14,16 @@ sources:
# Allow external-dns to publish DNS records for ClusterIP services (optional) # Allow external-dns to publish DNS records for ClusterIP services (optional)
publishInternalServices: false 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 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 Access keys to inject as environment variables
aws: aws:
secretKey: "" 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