diff --git a/ADDING-APPS.md b/ADDING-APPS.md index 82d23ed..ebd4710 100644 --- a/ADDING-APPS.md +++ b/ADDING-APPS.md @@ -393,6 +393,20 @@ env: value: "postgresql://myapp:secret@postgres/myapp" ``` +## Deployment Strategy + +Apps using `ReadWriteOnce` (RWO) persistent volumes **must** set `strategy: type: Recreate` on their Deployment. RWO volumes can only be attached to one pod at a time, so the default `RollingUpdate` strategy will cause Multi-Attach errors during updates (the new pod can't mount the volume while the old pod still holds it). + +```yaml +spec: + replicas: 1 + strategy: + type: Recreate + selector: + matchLabels: + component: web +``` + ## Security Requirements ### Security Contexts @@ -550,6 +564,7 @@ Before submitting a new or modified app, verify: - [ ] **Resources** - [ ] Security contexts on all pods (both pod-level and container-level) + - [ ] `strategy: type: Recreate` on deployments with ReadWriteOnce PVCs - [ ] Simple component labels, no Helm-style labels - [ ] Ingresses include external-dns annotations - [ ] Database apps include init jobs (if applicable) diff --git a/communitarian/deployment-api.yaml b/communitarian/deployment-api.yaml index 881ad1a..20d74c6 100644 --- a/communitarian/deployment-api.yaml +++ b/communitarian/deployment-api.yaml @@ -5,6 +5,8 @@ metadata: namespace: "{{ .namespace }}" spec: replicas: 1 + strategy: + type: Recreate selector: matchLabels: component: api diff --git a/crowdsec/crowdsec-deployment.yaml b/crowdsec/crowdsec-deployment.yaml index 5bb3ecf..4e36f8f 100644 --- a/crowdsec/crowdsec-deployment.yaml +++ b/crowdsec/crowdsec-deployment.yaml @@ -9,6 +9,8 @@ metadata: partOf: wild-cloud spec: replicas: 1 + strategy: + type: Recreate selector: matchLabels: app: crowdsec diff --git a/immich/deployment-machine-learning.yaml b/immich/deployment-machine-learning.yaml index 9a6598d..1cace39 100644 --- a/immich/deployment-machine-learning.yaml +++ b/immich/deployment-machine-learning.yaml @@ -5,6 +5,8 @@ metadata: name: immich-machine-learning spec: replicas: 1 + strategy: + type: Recreate selector: matchLabels: app: immich-machine-learning diff --git a/keila/deployment.yaml b/keila/deployment.yaml index a5b0678..04706bf 100644 --- a/keila/deployment.yaml +++ b/keila/deployment.yaml @@ -4,6 +4,8 @@ metadata: name: keila spec: replicas: 1 + strategy: + type: Recreate selector: matchLabels: component: web diff --git a/open-webui/deployment.yaml b/open-webui/deployment.yaml index 1d07d82..bc3393a 100644 --- a/open-webui/deployment.yaml +++ b/open-webui/deployment.yaml @@ -4,6 +4,8 @@ metadata: name: open-webui spec: replicas: 1 + strategy: + type: Recreate selector: matchLabels: component: web diff --git a/postgres/deployment.yaml b/postgres/deployment.yaml index 9b677d0..04bc453 100644 --- a/postgres/deployment.yaml +++ b/postgres/deployment.yaml @@ -5,6 +5,8 @@ metadata: name: postgres-deployment spec: replicas: 1 + strategy: + type: Recreate selector: matchLabels: app: postgres