40 lines
1000 B
YAML
40 lines
1000 B
YAML
apiVersion: batch/v1
|
|
kind: CronJob
|
|
metadata:
|
|
name: ipv6-dns-updater
|
|
namespace: external-dns
|
|
spec:
|
|
schedule: "*/60 * * * *"
|
|
jobTemplate:
|
|
spec:
|
|
template:
|
|
spec:
|
|
restartPolicy: OnFailure
|
|
containers:
|
|
- name: updater
|
|
image: alpine:3.20
|
|
command:
|
|
- /bin/sh
|
|
- -c
|
|
- |
|
|
apk add --no-cache curl jq &&
|
|
sh /mnt/update-ipv6.sh
|
|
env:
|
|
- name: CF_API_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: cloudflare-global-key
|
|
key: CF_API_KEY
|
|
- name: CF_EMAIL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: cloudflare-global-key
|
|
key: CF_EMAIL
|
|
volumeMounts:
|
|
- name: script
|
|
mountPath: /mnt
|
|
volumes:
|
|
- name: script
|
|
configMap:
|
|
name: ipv6-updater-script
|