diff --git a/apps/stalwart/stalwart-fresh-deployment.yaml b/apps/stalwart/stalwart-fresh-deployment.yaml index 220edfa..5201c47 100644 --- a/apps/stalwart/stalwart-fresh-deployment.yaml +++ b/apps/stalwart/stalwart-fresh-deployment.yaml @@ -289,7 +289,7 @@ spec: jobTemplate: spec: backoffLimit: 2 - activeDeadlineSeconds: 600 # 10 minute timeout + activeDeadlineSeconds: 1800 # 30 minute timeout (was 600s; retries + affinity settling can push past 10 min) template: metadata: labels: @@ -297,6 +297,17 @@ spec: spec: serviceAccountName: stalwart-backup restartPolicy: OnFailure + # Co-locate with stalwart-0 so both pods share the same hcloud block volume + # attachment (RWO). Without this the backup pod can be scheduled on a + # different node and hits FailedAttachVolume/Multi-Attach (DEV-468). + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchLabels: + app: stalwart + statefulset.kubernetes.io/pod-name: stalwart-0 + topologyKey: kubernetes.io/hostname containers: - name: backup image: alpine:3.19