Skip to content

Commit

Permalink
Fix secret name, add cloudflared to configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ProfMoo committed Sep 29, 2024
1 parent ea4bb09 commit 864186d
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 11 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"buildarr",
"buroa",
"Ceph",
"cloudflared",
"coredns",
"crds",
"customresourcedefinitions",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: external-dns-cloudflare
name: cloudflare-secret
spec:
target:
name: external-dns-cloudflare-secret
name: cloudflare-secret
template:
engineVersion: v2
data:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ kind: ExternalSecret
metadata:
name: cloudflared-tunnel
spec:
secretStoreRef:
kind: ClusterSecretStore
name: onepassword-connect
target:
name: cloudflared-tunnel-secret
template:
Expand All @@ -19,6 +16,20 @@ spec:
"TunnelSecret": "{{ .CLOUDFLARE_TUNNEL_SECRET }}",
"TunnelID": "${CLUSTER_CLOUDFLARE_TUNNEL_ID}"
}
dataFrom:
- extract:
key: cloudflare
data:
- secretKey: EMAIL
sourceRef:
storeRef:
name: bitwarden-fields
kind: ClusterSecretStore
remoteRef:
key: 0dd001ff-50e7-487e-a753-b1f9010310f5
property: EMAIL
- secretKey: API_KEY
sourceRef:
storeRef:
name: bitwarden-fields
kind: ClusterSecretStore
remoteRef:
key: 0dd001ff-50e7-487e-a753-b1f9010310f5
property: API_KEY
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./externalsecret.yaml
- ./dnsendpoint.yaml
- ./helmrelease.yaml
- ./external-secret.yaml
- ./dns-endpoint.yaml
- ./helm-release.yaml
configMapGenerator:
- name: cloudflared-configmap
files:
Expand Down
21 changes: 21 additions & 0 deletions kubernetes/homelab/apps/networking/external-dns/ks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,24 @@ spec:
provider: sops
secretRef:
name: sops-age
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: &app external-dns-cloudflare
namespace: flux-system
spec:
targetNamespace: networking
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./kubernetes/homelab/apps/networking/external-dns/unifi
prune: false
sourceRef:
kind: GitRepository
name: profmoo-home
wait: true
interval: 30m
retryInterval: 1m
timeout: 15m
1 change: 1 addition & 0 deletions kubernetes/homelab/apps/networking/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ resources:
- ./namespace.yaml
- ./nginx/ks.yaml
- ./external-dns/ks.yaml
- ./cloudflared/ks.yaml

0 comments on commit 864186d

Please sign in to comment.