Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cutover external-dns-unifi to API key #3496

Merged
merged 2 commits into from
Jan 10, 2025
Merged

Conversation

joryirving
Copy link
Owner

No description provided.

@smurf-bot smurf-bot bot added area/kubernetes Changes made in the kubernetes directory cluster/main cluster/utility labels Jan 10, 2025
@smurf-bot
Copy link
Contributor

smurf-bot bot commented Jan 10, 2025

--- kubernetes/main/apps/network/external-dns/unifi Kustomization: flux-system/external-dns-unifi ExternalSecret: network/external-dns-unifi-secret

+++ kubernetes/main/apps/network/external-dns/unifi Kustomization: flux-system/external-dns-unifi ExternalSecret: network/external-dns-unifi-secret

@@ -1,25 +0,0 @@

----
-apiVersion: external-secrets.io/v1beta1
-kind: ExternalSecret
-metadata:
-  labels:
-    app.kubernetes.io/name: external-dns-unifi
-    kustomize.toolkit.fluxcd.io/name: external-dns-unifi
-    kustomize.toolkit.fluxcd.io/namespace: flux-system
-  name: external-dns-unifi-secret
-  namespace: network
-spec:
-  dataFrom:
-  - extract:
-      key: unifi
-  secretStoreRef:
-    kind: ClusterSecretStore
-    name: onepassword-connect
-  target:
-    name: external-dns-unifi-secret
-    template:
-      data:
-        EXTERNAL_DNS_UNIFI_PASS: '{{ .EXTERNAL_DNS_UNIFI_PASS }}'
-        EXTERNAL_DNS_UNIFI_USER: '{{ .EXTERNAL_DNS_UNIFI_USER }}'
-      engineVersion: v2
-
--- kubernetes/main/apps/network/external-dns/unifi Kustomization: flux-system/external-dns-unifi HelmRelease: network/external-dns-unifi

+++ kubernetes/main/apps/network/external-dns/unifi Kustomization: flux-system/external-dns-unifi HelmRelease: network/external-dns-unifi

@@ -30,33 +30,28 @@

     domainFilters:
     - ..PLACEHOLDER_SECRET_DOMAIN..
     extraArgs:
     - --ignore-ingress-tls-spec
     fullnameOverride: external-dns-unifi
     podAnnotations:
-      secret.reloader.stakater.com/reload: external-dns-unifi-secret
+      secret.reloader.stakater.com/reload: external-dns-unifi
     policy: sync
     provider:
       name: webhook
       webhook:
         env:
         - name: UNIFI_HOST
           value: https://192.168.1.1
-        - name: UNIFI_USER
+        - name: UNIFI_API_KEY
           valueFrom:
             secretKeyRef:
-              key: EXTERNAL_DNS_UNIFI_USER
-              name: external-dns-unifi-secret
-        - name: UNIFI_PASS
-          valueFrom:
-            secretKeyRef:
-              key: EXTERNAL_DNS_UNIFI_PASS
-              name: external-dns-unifi-secret
+              key: EXTERNAL_DNS_UNIFI_API_KEY
+              name: external-dns-unifi
         image:
           repository: ghcr.io/kashalls/external-dns-unifi-webhook
-          tag: v0.3.4@sha256:28dc00c7a21f9571d43181fcc0dd3de59e291741f27bc075d7e06378876b2974
+          tag: v0.4.0@sha256:f71f9e64f723a1af77e9ecdcbaef2db2095721d33b385baee1848d0bf09d44e7
         livenessProbe:
           httpGet:
             path: /healthz
             port: http-webhook
           initialDelaySeconds: 10
           timeoutSeconds: 5
--- kubernetes/main/apps/network/external-dns/unifi Kustomization: flux-system/external-dns-unifi ExternalSecret: network/external-dns-unifi

+++ kubernetes/main/apps/network/external-dns/unifi Kustomization: flux-system/external-dns-unifi ExternalSecret: network/external-dns-unifi

@@ -0,0 +1,24 @@

+---
+apiVersion: external-secrets.io/v1beta1
+kind: ExternalSecret
+metadata:
+  labels:
+    app.kubernetes.io/name: external-dns-unifi
+    kustomize.toolkit.fluxcd.io/name: external-dns-unifi
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: external-dns-unifi
+  namespace: network
+spec:
+  dataFrom:
+  - extract:
+      key: unifi
+  secretStoreRef:
+    kind: ClusterSecretStore
+    name: onepassword-connect
+  target:
+    name: external-dns-unifi
+    template:
+      data:
+        EXTERNAL_DNS_UNIFI_API_KEY: '{{ .EXTERNAL_DNS_UNIFI_API_KEY }}'
+      engineVersion: v2
+

@smurf-bot
Copy link
Contributor

smurf-bot bot commented Jan 10, 2025

--- HelmRelease: network/external-dns-unifi Deployment: network/external-dns-unifi

+++ HelmRelease: network/external-dns-unifi Deployment: network/external-dns-unifi

@@ -19,13 +19,13 @@

   template:
     metadata:
       labels:
         app.kubernetes.io/name: external-dns
         app.kubernetes.io/instance: external-dns-unifi
       annotations:
-        secret.reloader.stakater.com/reload: external-dns-unifi-secret
+        secret.reloader.stakater.com/reload: external-dns-unifi
     spec:
       serviceAccountName: external-dns-unifi
       securityContext:
         fsGroup: 65534
         runAsNonRoot: true
         seccompProfile:
@@ -78,27 +78,22 @@

             port: http
           initialDelaySeconds: 5
           periodSeconds: 10
           successThreshold: 1
           timeoutSeconds: 5
       - name: webhook
-        image: ghcr.io/kashalls/external-dns-unifi-webhook:v0.3.4@sha256:28dc00c7a21f9571d43181fcc0dd3de59e291741f27bc075d7e06378876b2974
+        image: ghcr.io/kashalls/external-dns-unifi-webhook:v0.4.0@sha256:f71f9e64f723a1af77e9ecdcbaef2db2095721d33b385baee1848d0bf09d44e7
         imagePullPolicy: IfNotPresent
         env:
         - name: UNIFI_HOST
           value: https://192.168.1.1
-        - name: UNIFI_USER
+        - name: UNIFI_API_KEY
           valueFrom:
             secretKeyRef:
-              key: EXTERNAL_DNS_UNIFI_USER
-              name: external-dns-unifi-secret
-        - name: UNIFI_PASS
-          valueFrom:
-            secretKeyRef:
-              key: EXTERNAL_DNS_UNIFI_PASS
-              name: external-dns-unifi-secret
+              key: EXTERNAL_DNS_UNIFI_API_KEY
+              name: external-dns-unifi
         ports:
         - name: http-webhook
           protocol: TCP
           containerPort: 8080
         livenessProbe:
           failureThreshold: 2

@smurf-bot
Copy link
Contributor

smurf-bot bot commented Jan 10, 2025

--- kubernetes/main/apps/network/external-dns/unifi Kustomization: flux-system/external-dns-unifi ExternalSecret: network/external-dns-unifi-secret

+++ kubernetes/main/apps/network/external-dns/unifi Kustomization: flux-system/external-dns-unifi ExternalSecret: network/external-dns-unifi-secret

@@ -1,25 +0,0 @@

----
-apiVersion: external-secrets.io/v1beta1
-kind: ExternalSecret
-metadata:
-  labels:
-    app.kubernetes.io/name: external-dns-unifi
-    kustomize.toolkit.fluxcd.io/name: external-dns-unifi
-    kustomize.toolkit.fluxcd.io/namespace: flux-system
-  name: external-dns-unifi-secret
-  namespace: network
-spec:
-  dataFrom:
-  - extract:
-      key: unifi
-  secretStoreRef:
-    kind: ClusterSecretStore
-    name: onepassword-connect
-  target:
-    name: external-dns-unifi-secret
-    template:
-      data:
-        EXTERNAL_DNS_UNIFI_PASS: '{{ .EXTERNAL_DNS_UNIFI_PASS }}'
-        EXTERNAL_DNS_UNIFI_USER: '{{ .EXTERNAL_DNS_UNIFI_USER }}'
-      engineVersion: v2
-
--- kubernetes/main/apps/network/external-dns/unifi Kustomization: flux-system/external-dns-unifi HelmRelease: network/external-dns-unifi

+++ kubernetes/main/apps/network/external-dns/unifi Kustomization: flux-system/external-dns-unifi HelmRelease: network/external-dns-unifi

@@ -30,33 +30,28 @@

     domainFilters:
     - ..PLACEHOLDER_SECRET_DOMAIN..
     extraArgs:
     - --ignore-ingress-tls-spec
     fullnameOverride: external-dns-unifi
     podAnnotations:
-      secret.reloader.stakater.com/reload: external-dns-unifi-secret
+      secret.reloader.stakater.com/reload: external-dns-unifi
     policy: sync
     provider:
       name: webhook
       webhook:
         env:
         - name: UNIFI_HOST
           value: https://192.168.1.1
-        - name: UNIFI_USER
+        - name: UNIFI_API_KEY
           valueFrom:
             secretKeyRef:
-              key: EXTERNAL_DNS_UNIFI_USER
-              name: external-dns-unifi-secret
-        - name: UNIFI_PASS
-          valueFrom:
-            secretKeyRef:
-              key: EXTERNAL_DNS_UNIFI_PASS
-              name: external-dns-unifi-secret
+              key: EXTERNAL_DNS_UNIFI_API_KEY
+              name: external-dns-unifi
         image:
           repository: ghcr.io/kashalls/external-dns-unifi-webhook
-          tag: v0.3.4@sha256:28dc00c7a21f9571d43181fcc0dd3de59e291741f27bc075d7e06378876b2974
+          tag: v0.4.0@sha256:f71f9e64f723a1af77e9ecdcbaef2db2095721d33b385baee1848d0bf09d44e7
         livenessProbe:
           httpGet:
             path: /healthz
             port: http-webhook
           initialDelaySeconds: 10
           timeoutSeconds: 5
--- kubernetes/main/apps/network/external-dns/unifi Kustomization: flux-system/external-dns-unifi ExternalSecret: network/external-dns-unifi

+++ kubernetes/main/apps/network/external-dns/unifi Kustomization: flux-system/external-dns-unifi ExternalSecret: network/external-dns-unifi

@@ -0,0 +1,24 @@

+---
+apiVersion: external-secrets.io/v1beta1
+kind: ExternalSecret
+metadata:
+  labels:
+    app.kubernetes.io/name: external-dns-unifi
+    kustomize.toolkit.fluxcd.io/name: external-dns-unifi
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: external-dns-unifi
+  namespace: network
+spec:
+  dataFrom:
+  - extract:
+      key: unifi
+  secretStoreRef:
+    kind: ClusterSecretStore
+    name: onepassword-connect
+  target:
+    name: external-dns-unifi
+    template:
+      data:
+        EXTERNAL_DNS_UNIFI_API_KEY: '{{ .EXTERNAL_DNS_UNIFI_API_KEY }}'
+      engineVersion: v2
+

@smurf-bot
Copy link
Contributor

smurf-bot bot commented Jan 10, 2025

--- HelmRelease: network/external-dns-unifi Deployment: network/external-dns-unifi

+++ HelmRelease: network/external-dns-unifi Deployment: network/external-dns-unifi

@@ -19,13 +19,13 @@

   template:
     metadata:
       labels:
         app.kubernetes.io/name: external-dns
         app.kubernetes.io/instance: external-dns-unifi
       annotations:
-        secret.reloader.stakater.com/reload: external-dns-unifi-secret
+        secret.reloader.stakater.com/reload: external-dns-unifi
     spec:
       serviceAccountName: external-dns-unifi
       securityContext:
         fsGroup: 65534
         runAsNonRoot: true
         seccompProfile:
@@ -78,27 +78,22 @@

             port: http
           initialDelaySeconds: 5
           periodSeconds: 10
           successThreshold: 1
           timeoutSeconds: 5
       - name: webhook
-        image: ghcr.io/kashalls/external-dns-unifi-webhook:v0.3.4@sha256:28dc00c7a21f9571d43181fcc0dd3de59e291741f27bc075d7e06378876b2974
+        image: ghcr.io/kashalls/external-dns-unifi-webhook:v0.4.0@sha256:f71f9e64f723a1af77e9ecdcbaef2db2095721d33b385baee1848d0bf09d44e7
         imagePullPolicy: IfNotPresent
         env:
         - name: UNIFI_HOST
           value: https://192.168.1.1
-        - name: UNIFI_USER
+        - name: UNIFI_API_KEY
           valueFrom:
             secretKeyRef:
-              key: EXTERNAL_DNS_UNIFI_USER
-              name: external-dns-unifi-secret
-        - name: UNIFI_PASS
-          valueFrom:
-            secretKeyRef:
-              key: EXTERNAL_DNS_UNIFI_PASS
-              name: external-dns-unifi-secret
+              key: EXTERNAL_DNS_UNIFI_API_KEY
+              name: external-dns-unifi
         ports:
         - name: http-webhook
           protocol: TCP
           containerPort: 8080
         livenessProbe:
           failureThreshold: 2

@joryirving joryirving merged commit 30ba288 into main Jan 10, 2025
17 checks passed
@joryirving joryirving deleted the feat/external-dns-unifi-api branch January 10, 2025 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubernetes Changes made in the kubernetes directory cluster/main cluster/utility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant