Skip to content

Commit

Permalink
feat: move external-secrets to own namespace on storage cluster
Browse files Browse the repository at this point in the history
Signed-off-by: Devin Buhl <[email protected]>
  • Loading branch information
onedr0p committed Dec 29, 2023
1 parent 314321e commit 38ca15b
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 7 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"cert-manager": "guard",
"default": "home",
"digester-system": "hook",
"external-secrets": "secure",
"flux-system": "pipe",
"kube-system": "kubernetes",
"monitoring": "event",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ metadata:
name: &app external-secrets
namespace: flux-system
spec:
targetNamespace: kube-system
targetNamespace: external-secrets
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./kubernetes/storage/apps/kube-system/external-secrets/app
path: ./kubernetes/storage/apps/external-secrets/external-secrets/app
prune: true
sourceRef:
kind: GitRepository
Expand All @@ -27,13 +27,13 @@ metadata:
name: &app external-secrets-stores
namespace: flux-system
spec:
targetNamespace: kube-system
targetNamespace: external-secrets
commonMetadata:
labels:
app.kubernetes.io/name: *app
dependsOn:
- name: external-secrets
path: ./kubernetes/storage/apps/kube-system/external-secrets/stores
path: ./kubernetes/storage/apps/external-secrets/external-secrets/stores
prune: true
sourceRef:
kind: GitRepository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ spec:
provider:
onepassword:
connectHost: http://onepassword-connect.turbo.ac
# connectHost: http://onepassword-connect.kube-system.svc.cluster.local
# connectHost: http://onepassword-connect.external-secrets.svc.cluster.local
vaults:
Kubernetes: 1
auth:
secretRef:
connectTokenSecretRef:
name: onepassword-connect-secret
key: token
namespace: kube-system
namespace: external-secrets
9 changes: 9 additions & 0 deletions kubernetes/storage/apps/external-secrets/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
# Pre Flux-Kustomizations
- ./namespace.yaml
# Flux-Kustomizations
- ./external-secrets/ks.yaml
7 changes: 7 additions & 0 deletions kubernetes/storage/apps/external-secrets/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: external-secrets
labels:
kustomize.toolkit.fluxcd.io/prune: disabled
1 change: 0 additions & 1 deletion kubernetes/storage/apps/kube-system/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ resources:
# Pre Flux-Kustomizations
- ./namespace.yaml
# Flux-Kustomizations
- ./external-secrets/ks.yaml
- ./metrics-server/ks.yaml

0 comments on commit 38ca15b

Please sign in to comment.