53 lines
1.5 KiB
YAML
53 lines
1.5 KiB
YAML
apiVersion: batch/v1
|
|
kind: CronJob
|
|
metadata:
|
|
name: octodns-deployment
|
|
spec:
|
|
schedule: "*/1 * * * *"
|
|
jobTemplate:
|
|
spec:
|
|
template:
|
|
spec:
|
|
containers:
|
|
- name: git
|
|
image: alpine/git
|
|
command: ["git"]
|
|
args:
|
|
- clone
|
|
- https://git.kluster.moll.re/remoll/dns.git
|
|
- /etc/octodns/dns
|
|
volumeMounts:
|
|
- name: octodns-config
|
|
mountPath: /etc/octodns
|
|
|
|
- name: octodns
|
|
image: octodns
|
|
env:
|
|
- name: CLOUDFLARE_ACCOUNT_ID
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: cloudflare-api
|
|
key: CLOUDFLARE_ACCOUNT_ID
|
|
- name: CLOUDFLARE_API_TOKEN
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: cloudflare-api
|
|
key: CLOUDFLARE_API_TOKEN
|
|
- name: CLOUDFLARE_EMAIL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: cloudflare-api
|
|
key: CLOUDFLARE_EMAIL
|
|
|
|
command: ["octodns-sync"]
|
|
args:
|
|
- octodns-sync --config-file /etc/octodns/config.yaml # --doit
|
|
volumeMounts:
|
|
- name: octodns-config
|
|
mountPath: /etc/octodns
|
|
|
|
volumes:
|
|
- name: octodns-config
|
|
emptyDir: {}
|
|
restartPolicy: Never
|