feat(cluster): implement cloudflare-ddns cronjob in networking namespace

Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
Devin Buhl committed 2022-02-16 11:14:55 -05:00
1 parent 358eb6c74d
commit fe33dc2174
7 files changed
+122 -12

No files matched your search

@@ -0,0 +1,42 @@
---
apiVersion: batch/v1
kind: CronJob
metadata:
name: cloudflare-ddns
namespace: networking
spec:
schedule: "0 * * * *"
concurrencyPolicy: "Forbid"
successfulJobsHistoryLimit: 3
failedJobsHistoryLimit: 5
jobTemplate:
spec:
backoffLimit: 3
ttlSecondsAfterFinished: 300
template:
spec:
restartPolicy: Never
containers:
- name: cloudflare-ddns
image: ghcr.io/k8s-at-home/kubectl:v1.23.3
envFrom:
- secretRef:
name: cloudflare-ddns
command:
- "/bin/bash"
- "/app/cloudflare-ddns.sh"
volumeMounts:
- name: cloudflare-ddns
mountPath: /app/cloudflare-ddns.sh
subPath: cloudflare-ddns.sh
readOnly: true
volumes:
- name: cloudflare-ddns
projected:
defaultMode: 0775
sources:
- configMap:
name: cloudflare-ddns
items:
- key: cloudflare-ddns.sh
path: cloudflare-ddns.sh