From 0329546d87fb733196dc40757c664bbf61ca1067 Mon Sep 17 00:00:00 2001 From: Jeffrey Smeets Date: Sun, 23 Aug 2026 22:42:09 +0200 Subject: [PATCH] azure-ddns: migrate to envFrom with a per-container InfisicalSecret Also moves the manifests into a component directory, matching the other migrated apps. --- .../azure-ddns-statefulset.yaml | 69 ------------------- .../azure-ddns/infisicalsecret.yaml} | 9 +-- .../service.yaml} | 0 .../azure-ddns/statefulset.yaml | 31 +++++++++ 4 files changed, 36 insertions(+), 73 deletions(-) delete mode 100755 applications/azure-ddns-python/azure-ddns-statefulset.yaml rename applications/{infisical/Infisical-secrets/azure-ddns-infisicalsecret.yaml => azure-ddns-python/azure-ddns/infisicalsecret.yaml} (71%) rename applications/azure-ddns-python/{azure-ddns-service.yaml => azure-ddns/service.yaml} (100%) create mode 100755 applications/azure-ddns-python/azure-ddns/statefulset.yaml 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 16da15a..0000000 --- a/applications/azure-ddns-python/azure-ddns-statefulset.yaml +++ /dev/null @@ -1,69 +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 - env: - - name: AZURE_TENANT_ID - valueFrom: - secretKeyRef: - name: azure-ddns-secrets - key: TENANT_ID - - name: AZURE_CLIENT_ID - valueFrom: - secretKeyRef: - name: azure-ddns-secrets - key: CLIENT_ID - - name: AZURE_CLIENT_SECRET - valueFrom: - secretKeyRef: - name: azure-ddns-secrets - key: CLIENT_SECRET - - name: AZURE_SUBSCRIPTION_ID - valueFrom: - secretKeyRef: - name: azure-ddns-secrets - key: SUBSCRIPTION_ID - - name: AZURE_RESOURCE_GROUP - valueFrom: - secretKeyRef: - name: azure-ddns-secrets - key: RESOURCE_GROUP - - name: AZURE_ZONE_NAME - valueFrom: - secretKeyRef: - name: azure-ddns-secrets - key: AZURE_ZONE_NAME - - name: GOTIFY_URL - valueFrom: - secretKeyRef: - name: azure-ddns-secrets - key: GOTIFY_URL - - name: GOTIFY_TOKEN - valueFrom: - secretKeyRef: - name: azure-ddns-secrets - key: GOTIFY_TOKEN - restartPolicy: Always diff --git a/applications/infisical/Infisical-secrets/azure-ddns-infisicalsecret.yaml b/applications/azure-ddns-python/azure-ddns/infisicalsecret.yaml similarity index 71% rename from applications/infisical/Infisical-secrets/azure-ddns-infisicalsecret.yaml rename to applications/azure-ddns-python/azure-ddns/infisicalsecret.yaml index 59cc55c..f5bd5ff 100644 --- a/applications/infisical/Infisical-secrets/azure-ddns-infisicalsecret.yaml +++ b/applications/azure-ddns-python/azure-ddns/infisicalsecret.yaml @@ -1,7 +1,7 @@ apiVersion: secrets.infisical.com/v1alpha1 kind: InfisicalSecret metadata: - name: azure-ddns-secrets + name: azure-ddns-app-secrets namespace: infisical spec: hostAPI: https://infisical.jsme.be @@ -16,9 +16,10 @@ spec: secretsScope: projectSlug: "kubernetes" envSlug: "prod" - secretsPath: "/azure-ddns" - recursive: true + secretsPath: "/azure-ddns/azure-ddns" + # Non-recursive: keys are already named as the container expects. + recursive: false managedSecretReference: - secretName: azure-ddns-secrets + secretName: azure-ddns-app-secrets secretNamespace: azure-ddns secretType: Opaque diff --git a/applications/azure-ddns-python/azure-ddns-service.yaml b/applications/azure-ddns-python/azure-ddns/service.yaml similarity index 100% rename from applications/azure-ddns-python/azure-ddns-service.yaml rename to applications/azure-ddns-python/azure-ddns/service.yaml diff --git a/applications/azure-ddns-python/azure-ddns/statefulset.yaml b/applications/azure-ddns-python/azure-ddns/statefulset.yaml new file mode 100755 index 0000000..2ec8cbb --- /dev/null +++ b/applications/azure-ddns-python/azure-ddns/statefulset.yaml @@ -0,0 +1,31 @@ +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