Skip to content

Commit

Permalink
fix(unifi): switch to api key
Browse files Browse the repository at this point in the history
  • Loading branch information
jfroy committed Jan 12, 2025
1 parent 5b8c598 commit 2c02584
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 31 deletions.
14 changes: 7 additions & 7 deletions kubernetes/apps/network/external-dns/unifi/externalsecret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: external-dns-unifi
name: unpoller
spec:
secretStoreRef:
kind: ClusterSecretStore
name: onepassword
target:
name: external-dns-unifi-secret
template:
type: kubernetes.io/basic-auth
dataFrom:
- extract:
key: external-dns-unifi
name: external-dns-unifi
data:
- secretKey: UNIFI_API_KEY
remoteRef:
key: unifi
property: credential
19 changes: 8 additions & 11 deletions kubernetes/apps/network/external-dns/unifi/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,9 @@ spec:
env:
- name: UNIFI_HOST
value: https://192.168.1.1
- name: UNIFI_USER
valueFrom:
secretKeyRef:
name: external-dns-unifi-secret
key: username
- name: UNIFI_PASS
valueFrom:
secretKeyRef:
name: external-dns-unifi-secret
key: password
envFrom:
- secretRef:
name: external-dns-unifi
livenessProbe:
httpGet:
path: /healthz
Expand All @@ -66,7 +59,11 @@ spec:
sources: ["ingress", "service"]
txtOwnerId: kantai
txtPrefix: edns.
domainFilters: ["${PUBLIC_DOMAIN0}", "${PUBLIC_DOMAIN1}", "${PUBLIC_DOMAIN2}", "internal."]
domainFilters:
- "${PUBLIC_DOMAIN0}"
- "${PUBLIC_DOMAIN1}"
- "${PUBLIC_DOMAIN2}"
- "internal."
serviceMonitor:
enabled: true
podAnnotations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ spec:
name: onepassword
target:
name: unpoller
dataFrom:
- extract:
key: unpoller
data:
- secretKey: UP_UNIFI_DEFAULT_API_KEY
remoteRef:
key: unifi
property: credential
13 changes: 3 additions & 10 deletions kubernetes/apps/observability/unpoller/app/helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,10 @@ spec:
UP_UNIFI_DEFAULT_ROLE: home-ops
UP_UNIFI_DEFAULT_URL: https://udmpro-3014
UP_UNIFI_DEFAULT_VERIFY_SSL: false
UP_UNIFI_DEFAULT_USER:
valueFrom:
secretKeyRef:
name: unpoller
key: username
UP_UNIFI_DEFAULT_PASS:
valueFrom:
secretKeyRef:
name: unpoller
key: password
UP_INFLUXDB_DISABLE: true
envFrom:
- secretRef:
name: unpoller
probes:
liveness:
enabled: true
Expand Down

0 comments on commit 2c02584

Please sign in to comment.