df687e310b
The active-active arrstack deploy (#383) was stuck: the app Deployments (wave 0) can't become Healthy without their database, so ArgoCD never advanced to wave 1 to create the shared Postgres cluster. And /config was an RWO cephrbd PVC, so 3 replicas hit Multi-Attach. - move DB infra ahead of the apps: VSS + backup ObjectStoreUser/Bucket wave -3, CNPG Cluster -2, Databases -1 (apps stay at default 0) - switch each app's /config to emptyDir (per-pod, stateless; library is in Postgres, config is env-driven; MediaCover regenerates). Old RWO config PVCs orphan.
67 lines
1.8 KiB
YAML
67 lines
1.8 KiB
YAML
---
|
|
# Per-app Postgres role credentials. Each is seeded out-of-band at
|
|
# kv/kubernetes/namespace/arrstack/default/<app>-db (keys: username, password);
|
|
# the default k8s role's templated policy already grants read on
|
|
# kv/data/kubernetes/namespace/{{sa_namespace}}/{{sa_name}}/* for the
|
|
# arrstack/default ServiceAccount, so no terraform-vault change is needed. VSO
|
|
# syncs each into the <app>-db Secret, which is both the CNPG managed role's
|
|
# passwordSecret (cnpg_cluster.yaml) and the source of the app Deployment's
|
|
# <App>__Postgres__User/__Password env. Wave 0: must exist before the Cluster
|
|
# (wave 1) reconciles the roles.
|
|
apiVersion: secrets.hashicorp.com/v1beta1
|
|
kind: VaultStaticSecret
|
|
metadata:
|
|
name: sonarr-db
|
|
namespace: arrstack
|
|
annotations:
|
|
argocd.argoproj.io/sync-wave: "-3"
|
|
spec:
|
|
destination:
|
|
create: true
|
|
name: sonarr-db
|
|
overwrite: true
|
|
hmacSecretData: true
|
|
mount: kv
|
|
path: kubernetes/namespace/arrstack/default/sonarr-db
|
|
refreshAfter: 5m
|
|
type: kv-v2
|
|
vaultAuthRef: default
|
|
---
|
|
apiVersion: secrets.hashicorp.com/v1beta1
|
|
kind: VaultStaticSecret
|
|
metadata:
|
|
name: radarr-db
|
|
namespace: arrstack
|
|
annotations:
|
|
argocd.argoproj.io/sync-wave: "-3"
|
|
spec:
|
|
destination:
|
|
create: true
|
|
name: radarr-db
|
|
overwrite: true
|
|
hmacSecretData: true
|
|
mount: kv
|
|
path: kubernetes/namespace/arrstack/default/radarr-db
|
|
refreshAfter: 5m
|
|
type: kv-v2
|
|
vaultAuthRef: default
|
|
---
|
|
apiVersion: secrets.hashicorp.com/v1beta1
|
|
kind: VaultStaticSecret
|
|
metadata:
|
|
name: prowlarr-db
|
|
namespace: arrstack
|
|
annotations:
|
|
argocd.argoproj.io/sync-wave: "-3"
|
|
spec:
|
|
destination:
|
|
create: true
|
|
name: prowlarr-db
|
|
overwrite: true
|
|
hmacSecretData: true
|
|
mount: kv
|
|
path: kubernetes/namespace/arrstack/default/prowlarr-db
|
|
refreshAfter: 5m
|
|
type: kv-v2
|
|
vaultAuthRef: default
|