forked from rancher/rancher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudflare_template.go
32 lines (31 loc) · 969 Bytes
/
cloudflare_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
package globaldns
var CloudflareDeploymentTemplate = `
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: {{.deploymentName}}
spec:
strategy:
type: Recreate
template:
metadata:
labels:
app: {{.deploymentName}}
spec:
serviceAccountName: external-dns
containers:
- name: {{.deploymentName}}
image: registry.opensource.zalan.do/teapot/external-dns:latest
args:
- --source=service
- --source=ingress
- --domain-filter={{.cloudflareDomain}} # (optional) limit to only example.com domains; change to match the zone created above.
- --provider=cloudflare
- --cloudflare-proxied # (optional) enable the proxy feature of Cloudflare (DDOS protection, CDN...)
- --log-level=debug
- --publish-internal-services
env:
- name: CF_API_KEY
value: "{{.apiKey}}"
- name: CF_API_EMAIL
value: "{{.apiEmail}}"`