Skip to content

Commit

Permalink
feat: add external secret
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsimonemms committed Nov 10, 2024
1 parent dfc285e commit a069c0c
Show file tree
Hide file tree
Showing 6 changed files with 140 additions and 0 deletions.
28 changes: 28 additions & 0 deletions registry/clusters/dev/components/external-dns/application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: external-dns
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "10"
spec:
project: default
source:
chart: external-dns
repoURL: registry-1.docker.io/bitnamicharts
targetRevision: 8.5.1
helm:
valuesObject:
provider: cloudflare
cloudflare:
secretName: cloudflare
proxied: false
destination:
server: https://kubernetes.default.svc
namespace: external-dns
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
18 changes: 18 additions & 0 deletions registry/clusters/dev/components/external-dns/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: cloudflare-api-token
namespace: external-dns
annotations:
argocd.argoproj.io/sync-wave: "10"
spec:
refreshInterval: 10s
secretStoreRef:
kind: ClusterSecretStore
name: infisical
target:
name: cloudflare
data:
- secretKey: cloudflare_api_token
remoteRef:
key: CLOUDFLARE_API_TOKEN
24 changes: 24 additions & 0 deletions registry/clusters/dev/external-dns.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: external-secrets-dns
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "30"
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
source:
repoURL: https://github.com/mrsimonemms/infrastructure
path: registry/clusters/dev/components/external-dns
targetRevision: HEAD
destination:
server: https://kubernetes.default.svc
namespace: external-dns
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
28 changes: 28 additions & 0 deletions registry/clusters/prod/components/external-dns/application.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: external-dns
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "10"
spec:
project: default
source:
chart: external-dns
repoURL: registry-1.docker.io/bitnamicharts
targetRevision: 8.5.1
helm:
valuesObject:
provider: cloudflare
cloudflare:
secretName: cloudflare
proxied: false
destination:
server: https://kubernetes.default.svc
namespace: external-dns
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
18 changes: 18 additions & 0 deletions registry/clusters/prod/components/external-dns/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: cloudflare-api-token
namespace: external-dns
annotations:
argocd.argoproj.io/sync-wave: "10"
spec:
refreshInterval: 10s
secretStoreRef:
kind: ClusterSecretStore
name: infisical
target:
name: cloudflare
data:
- secretKey: cloudflare_api_token
remoteRef:
key: CLOUDFLARE_API_TOKEN
24 changes: 24 additions & 0 deletions registry/clusters/prod/external-dns.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: external-secrets-dns
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "30"
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
source:
repoURL: https://github.com/mrsimonemms/infrastructure
path: registry/clusters/prod/components/external-dns
targetRevision: HEAD
destination:
server: https://kubernetes.default.svc
namespace: external-dns
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true

0 comments on commit a069c0c

Please sign in to comment.