From 79e2d1e6de5b52ae8afa5bda2a7bca22098254a9 Mon Sep 17 00:00:00 2001 From: Jeffrey Smeets Date: Mon, 14 Sep 2026 23:48:41 +0200 Subject: [PATCH] Run ddns as a CronJob instead of a StatefulSet Co-Authored-By: Claude Opus 5 --- .../azure-ddns-python/azure-ddns/cronjob.yaml | 30 ++++++++++++++++++ .../azure-ddns-python/azure-ddns/service.yaml | 14 --------- .../azure-ddns/statefulset.yaml | 31 ------------------- 3 files changed, 30 insertions(+), 45 deletions(-) create mode 100644 applications/azure-ddns-python/azure-ddns/cronjob.yaml delete mode 100755 applications/azure-ddns-python/azure-ddns/service.yaml delete mode 100755 applications/azure-ddns-python/azure-ddns/statefulset.yaml diff --git a/applications/azure-ddns-python/azure-ddns/cronjob.yaml b/applications/azure-ddns-python/azure-ddns/cronjob.yaml new file mode 100644 index 0000000..d47695d --- /dev/null +++ b/applications/azure-ddns-python/azure-ddns/cronjob.yaml @@ -0,0 +1,30 @@ +apiVersion: batch/v1 +kind: CronJob +metadata: + name: azure-ddns + namespace: azure-ddns +spec: + schedule: "*/30 * * * *" + concurrencyPolicy: Forbid + successfulJobsHistoryLimit: 3 + failedJobsHistoryLimit: 3 + startingDeadlineSeconds: 300 + jobTemplate: + spec: + backoffLimit: 3 + template: + spec: + restartPolicy: OnFailure + containers: + - name: azure-ddns + image: gitea.jsme.be/jeffrey/azure-ddns-python:1.2 + resources: + requests: + cpu: 50m + memory: 128Mi + limits: + cpu: 200m + memory: 256Mi + envFrom: + - secretRef: + name: azure-ddns-app-secrets diff --git a/applications/azure-ddns-python/azure-ddns/service.yaml b/applications/azure-ddns-python/azure-ddns/service.yaml deleted file mode 100755 index c87dcf1..0000000 --- a/applications/azure-ddns-python/azure-ddns/service.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: azure-ddns - namespace: azure-ddns -spec: - selector: - app: azure-ddns - ports: - - name: azure-ddns - port: 443 - targetPort: 443 - protocol: TCP - type: ClusterIP \ No newline at end of file diff --git a/applications/azure-ddns-python/azure-ddns/statefulset.yaml b/applications/azure-ddns-python/azure-ddns/statefulset.yaml deleted file mode 100755 index 2ec8cbb..0000000 --- a/applications/azure-ddns-python/azure-ddns/statefulset.yaml +++ /dev/null @@ -1,31 +0,0 @@ -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: azure-ddns - namespace: azure-ddns -spec: - replicas: 1 - selector: - matchLabels: - app: azure-ddns - serviceName: azure-ddns - template: - metadata: - labels: - app: azure-ddns - spec: - terminationGracePeriodSeconds: 60 - containers: - - name: azure-ddns - image: gitea.jsme.be/jeffrey/azure-ddns-python:1.1 - resources: - requests: - cpu: 50m - memory: 128Mi - limits: - cpu: 200m - memory: 256Mi - envFrom: - - secretRef: - name: azure-ddns-app-secrets - restartPolicy: Always