f15d768227
Convert the three *arr apps from single-replica upstream LinuxServer/SQLite to our -unkin2 forks running active-active (replicas 3) on a shared CNPG Postgres cluster. - new apps/base/arrstack/postgres/: CNPG Cluster arrstack-postgres (3 instances, 3 managed login roles sonarr/radarr/prowlarr, throwaway initdb owner), per-app Database CRDs (<app>-main), cephrgw backup bucket + nightly ScheduledBackup, and 3 VaultStaticSecrets syncing the <app>-db role credentials. - per app: image -> docker-internal/<app>:v<base>-unkin2; replicas 3 + RollingUpdate; drop the apikey-init initContainer + PUID/PGID/TZ; run the binary directly with -nosingleinstancecheck; env from a new ConfigMap plus Postgres user/password and the API key from Secrets; /config PVC -> RWX cephfs-raid5-retain (shared).
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: "0"
|
|
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: "0"
|
|
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: "0"
|
|
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
|