-
-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: deploy unifi exdns webhook to storage cluster
Signed-off-by: Devin Buhl <[email protected]>
- Loading branch information
Showing
5 changed files
with
113 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
kubernetes/storage/apps/network/external-dns/unifi/externalsecret.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/external-secrets.io/externalsecret_v1beta1.json | ||
apiVersion: external-secrets.io/v1beta1 | ||
kind: ExternalSecret | ||
metadata: | ||
name: external-dns-unifi | ||
spec: | ||
secretStoreRef: | ||
kind: ClusterSecretStore | ||
name: onepassword-connect | ||
target: | ||
name: external-dns-unifi-secret | ||
template: | ||
engineVersion: v2 | ||
data: | ||
EXTERNAL_DNS_UNIFI_USER: "{{ .EXTERNAL_DNS_UNIFI_USER }}" | ||
EXTERNAL_DNS_UNIFI_PASS: "{{ .EXTERNAL_DNS_UNIFI_PASS }}" | ||
dataFrom: | ||
- extract: | ||
key: external-dns-unifi |
62 changes: 62 additions & 0 deletions
62
kubernetes/storage/apps/network/external-dns/unifi/helmrelease.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- | ||
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/helm.toolkit.fluxcd.io/helmrelease_v2.json | ||
apiVersion: helm.toolkit.fluxcd.io/v2 | ||
kind: HelmRelease | ||
metadata: | ||
name: &app external-dns-unifi | ||
spec: | ||
interval: 30m | ||
chart: | ||
spec: | ||
chart: external-dns | ||
version: 1.14.4 | ||
sourceRef: | ||
kind: HelmRepository | ||
name: external-dns | ||
namespace: flux-system | ||
install: | ||
remediation: | ||
retries: 3 | ||
upgrade: | ||
cleanupOnFail: true | ||
remediation: | ||
strategy: rollback | ||
retries: 3 | ||
values: | ||
fullnameOverride: *app | ||
logLevel: debug | ||
provider: | ||
name: webhook | ||
webhook: | ||
image: | ||
repository: ghcr.io/kashalls/external-dns-unifi-webhook | ||
tag: v0.0.5@sha256:221b808ff11ad8d23c4792a067c7184c135f30fc3823e3418321a3203af6b352 | ||
env: | ||
- name: UNIFI_HOST | ||
value: https://192.168.1.1 | ||
- name: SERVER_HOST | ||
value: 0.0.0.0 | ||
- name: UNIFI_USER | ||
valueFrom: | ||
secretKeyRef: | ||
name: &secret external-dns-unifi-secret | ||
key: EXTERNAL_DNS_UNIFI_USER | ||
- name: UNIFI_PASS | ||
valueFrom: | ||
secretKeyRef: | ||
name: *secret | ||
key: EXTERNAL_DNS_UNIFI_PASS | ||
- name: LOG_LEVEL | ||
value: "debug" | ||
- name: UNIFI_SKIP_TLS_VERIFY | ||
value: "true" | ||
policy: sync | ||
sources: ["ingress", "service"] | ||
txtOwnerId: default | ||
txtPrefix: k8s. | ||
domainFilters: ["turbo.ac"] | ||
excludeDomains: ["internal", "devbu.io"] | ||
serviceMonitor: | ||
enabled: true | ||
podAnnotations: | ||
secret.reloader.stakater.com/reload: *secret |
7 changes: 7 additions & 0 deletions
7
kubernetes/storage/apps/network/external-dns/unifi/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ./externalsecret.yaml | ||
- ./helmrelease.yaml |