From 3bbf4f1266e3f13630488f1cc184386ee4c58fe0 Mon Sep 17 00:00:00 2001 From: JJGadgets Date: Tue, 10 Jun 2025 14:52:34 +0800 Subject: [PATCH] fix(volsync/template): affinity to prevent scheduling --- kube/deploy/core/storage/volsync/template/rsrc-r2.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kube/deploy/core/storage/volsync/template/rsrc-r2.yaml b/kube/deploy/core/storage/volsync/template/rsrc-r2.yaml index b2a13eea..28023639 100644 --- a/kube/deploy/core/storage/volsync/template/rsrc-r2.yaml +++ b/kube/deploy/core/storage/volsync/template/rsrc-r2.yaml @@ -94,3 +94,9 @@ spec: matchExpressions: - key: kubernetes.io/metadata.name operator: Exists + podAffinity: # create conflicting affinity so this won't schedule when scheduled is running + requiredDuringSchedulingIgnoredDuringExecution: + - topologyKey: kubernetes.io/hostname + labelSelector: + matchLabels: + batch.kubernetes.io/job-name: "volsync-src-${PVC}-r2-restic"