Skip to content

Commit

Permalink
feat: Switch Most Secrets to External Secrets Operator
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurVardevanyan committed Feb 16, 2024
1 parent ba0c768 commit 4cc3562
Show file tree
Hide file tree
Showing 47 changed files with 216 additions and 109 deletions.
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/bitwarden.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/bitwarden/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/cockroachdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/cockroachdb/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/container-security/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/dragonfly-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/dragonfly-operator/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/eclipse-che-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/eclipse-che/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/external-secrets-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/external-secrets-operator/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/grafana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/grafana/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/heimdall.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/heimdall/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/homeassistant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/homeassistant/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/homelab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: tekton/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/imagepuller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/imagepuller/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/influxdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/influxdb/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/keep-alive.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/keep-alive/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/knative.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/knative/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/kube-eagle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/kube-eagle/overlays/default
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/kube-vip.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/kube-vip/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/kyverno.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/kyverno/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
Expand Down
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/longhorn-system.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/longhorn/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/mariadb-galera.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/mariadb-galera/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/minio-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/minio-operator/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/mongodb-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/mongodb-operator/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
Expand Down
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/network-observability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/network-observability/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/nextcloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/nextcloud/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/openshift-monitoring.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ spec:
path: okd/openshift-monitoring/base
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/photoprism.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/photoprism/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/phpmyadmin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/phpmyadmin/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/postgres/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/quay.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/quay/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/stackrox-central.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/stackrox-central/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/stackrox-secure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/stackrox-secure/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/tekton.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/tekton/overlays/operator
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/traefik.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/traefik/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/unifi-network-application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/unifi-network-application/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/uptime-kuma.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/uptime-kuma/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/vault.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/vault/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/version-checker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/version-checker/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
2 changes: 0 additions & 2 deletions kubernetes/argocd/applications/zitadel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ spec:
path: kubernetes/zitadel/overlays/okd
repoURL: https://git.arthurvardevanyan.com/ArthurVardevanyan/HomeLab
targetRevision: HEAD
plugin:
name: argocd-vault-plugin-kustomize
syncPolicy:
syncOptions:
- CreateNamespace=true
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ resources:
- ./operator-config.yaml
- ./operator-group.yaml
- ./subscription.yaml
- ./secret.yaml
17 changes: 17 additions & 0 deletions kubernetes/external-secrets-operator/base/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: external-secrets.io/v1beta1
kind: ClusterSecretStore
metadata:
name: vault
spec:
provider:
vault:
server: "https://vault.arthurvardevanyan.com"
path: "secret"
version: "v2"
auth:
kubernetes:
mountPath: "kubernetes"
role: "argocd"
serviceAccountRef:
name: "argocd-repo-server"
namespace: "argocd"
23 changes: 22 additions & 1 deletion kubernetes/grafana/base/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,25 @@ stringData:
GF_DATABASE_HOST: grafana-primary.postgres.svc
GF_DATABASE_NAME: grafana
GF_DATABASE_USER: grafana
GF_DATABASE_PASSWORD: <path:secret/data/homelab/postgres#grafana_password>
#GF_DATABASE_PASSWORD: <path:secret/data/homelab/postgres#grafana_password>
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: database
namespace: grafana
labels:
app.kubernetes.io/instance: grafana
spec:
refreshInterval: "1h"
secretStoreRef:
name: vault
kind: ClusterSecretStore
target:
name: database
creationPolicy: "Merge"
data:
- secretKey: GF_DATABASE_PASSWORD
remoteRef:
key: homelab/postgres
property: grafana_password
Loading

0 comments on commit 4cc3562

Please sign in to comment.