forked from rancher/rancher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
alidns_template.go
55 lines (53 loc) · 1.39 KB
/
alidns_template.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package globaldns
var AlidnsDeploymentTemplate = `
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{.providerName}}
spec:
strategy:
type: Recreate
template:
metadata:
labels:
app: {{.providerName}}
spec:
serviceAccountName: external-dns
containers:
- name: {{.providerName}}
image: {{.externalDnsImage}}
args:
- --source=service
- --source=ingress
- --domain-filter={{.rootDomain}}
- --provider=alibabacloud
- --alibaba-cloud-zone-type=public # only look at public hosted zones (valid values are public, private or no value for both)
- --registry=txt
- --txt-owner-id=my-identifier
- --alibaba-cloud-config-file=/etc/alibaba/config.yaml
- --log-level=debug
- --publish-internal-services
volumeMounts:
- name: config
mountPath: /etc/alibaba
readOnly: true
- mountPath: /usr/share/zoneinfo
name: zoneinfo
readOnly: true
volumes:
- name: config
secret:
secretName: {{.providerName}}
- name: zoneinfo
hostPath:
path: /usr/share/zoneinfo`
var AlidnsSecretTemplate = `
apiVersion: v1
kind: Secret
metadata:
name: {{.providerName}}
type: Opaque
stringData:
config.yaml: |-
accessKeyId: {{.accessKey}}
accessKeySecret: {{.secretKey}}`