arrstack: fix sync-wave deadlock + config multi-attach
ci/woodpecker/pr/vector-test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/kubeconform Pipeline was successful

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.
This commit is contained in:
2026-08-22 12:21:25 +10:00
parent e0d47295f2
commit df687e310b
12 changed files with 15 additions and 16 deletions
@@ -7,6 +7,9 @@ kind: ObjectStoreUser
metadata:
name: cnpg-arrstack-backup
namespace: arrstack
annotations:
# S3 creds Secret must exist before the Cluster (wave -2) reconciles its backup.
argocd.argoproj.io/sync-wave: "-3"
spec:
displayName: "CNPG backup owner (arrstack)"
uid: cnpg-arrstack-backup
@@ -19,6 +22,8 @@ kind: Bucket
metadata:
name: cnpg-arrstack
namespace: arrstack
annotations:
argocd.argoproj.io/sync-wave: "-3"
spec:
placementTarget: ec
bucketName: cnpg-arrstack
@@ -15,7 +15,7 @@ metadata:
# Wave 1: the per-app <app>-db Secrets (wave 0) must exist first — CNPG reads
# them as the managed roles' passwordSecret. ArgoCD gates dependents on the
# Cluster's health status.
argocd.argoproj.io/sync-wave: "1"
argocd.argoproj.io/sync-wave: "-2"
spec:
inheritedMetadata:
annotations:
@@ -8,7 +8,7 @@ metadata:
name: prowlarr-main
namespace: arrstack
annotations:
argocd.argoproj.io/sync-wave: "2"
argocd.argoproj.io/sync-wave: "-1"
spec:
cluster:
name: arrstack-postgres
@@ -8,7 +8,7 @@ metadata:
name: radarr-main
namespace: arrstack
annotations:
argocd.argoproj.io/sync-wave: "2"
argocd.argoproj.io/sync-wave: "-1"
spec:
cluster:
name: arrstack-postgres
@@ -8,7 +8,7 @@ metadata:
name: sonarr-main
namespace: arrstack
annotations:
argocd.argoproj.io/sync-wave: "2"
argocd.argoproj.io/sync-wave: "-1"
spec:
cluster:
name: arrstack-postgres
@@ -14,7 +14,7 @@ metadata:
name: sonarr-db
namespace: arrstack
annotations:
argocd.argoproj.io/sync-wave: "0"
argocd.argoproj.io/sync-wave: "-3"
spec:
destination:
create: true
@@ -33,7 +33,7 @@ metadata:
name: radarr-db
namespace: arrstack
annotations:
argocd.argoproj.io/sync-wave: "0"
argocd.argoproj.io/sync-wave: "-3"
spec:
destination:
create: true
@@ -52,7 +52,7 @@ metadata:
name: prowlarr-db
namespace: arrstack
annotations:
argocd.argoproj.io/sync-wave: "0"
argocd.argoproj.io/sync-wave: "-3"
spec:
destination:
create: true
+1 -2
View File
@@ -92,5 +92,4 @@ spec:
mountPath: /config
volumes:
- name: config
persistentVolumeClaim:
claimName: prowlarr-config
emptyDir: {}
@@ -3,7 +3,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- pvc-config.yaml
- vaultstaticsecret.yaml
- configmap.yaml
- deployment.yaml
+1 -2
View File
@@ -94,8 +94,7 @@ spec:
mountPath: /media/movies
volumes:
- name: config
persistentVolumeClaim:
claimName: radarr-config
emptyDir: {}
- name: media-movies
persistentVolumeClaim:
claimName: media-movies
@@ -3,7 +3,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- pvc-config.yaml
- vaultstaticsecret.yaml
- configmap.yaml
- deployment.yaml
+1 -2
View File
@@ -94,8 +94,7 @@ spec:
mountPath: /media/tv
volumes:
- name: config
persistentVolumeClaim:
claimName: sonarr-config
emptyDir: {}
- name: media-tv
persistentVolumeClaim:
claimName: media-tv
@@ -3,7 +3,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- pvc-config.yaml
- vaultstaticsecret.yaml
- configmap.yaml
- deployment.yaml