From fc2f2611532092ca969c82e706fd9f74b6ff2f46 Mon Sep 17 00:00:00 2001 From: Salah Al Saleh Date: Mon, 8 Jan 2024 17:40:26 +0000 Subject: [PATCH] Add default node affinity rules to rqlite and minio --- pkg/kotsadm/objects/minio_objects.go | 3 +++ pkg/kotsadm/objects/rqlite_objects.go | 1 + 2 files changed, 4 insertions(+) diff --git a/pkg/kotsadm/objects/minio_objects.go b/pkg/kotsadm/objects/minio_objects.go index f96e7f2651..868a9c8147 100644 --- a/pkg/kotsadm/objects/minio_objects.go +++ b/pkg/kotsadm/objects/minio_objects.go @@ -124,6 +124,9 @@ func MinioStatefulset(deployOptions types.DeployOptions, size resource.Quantity) }, }, Spec: corev1.PodSpec{ + Affinity: &corev1.Affinity{ + NodeAffinity: defaultKOTSNodeAffinity(), + }, SecurityContext: securityContext, ImagePullSecrets: pullSecrets, InitContainers: initContainers, diff --git a/pkg/kotsadm/objects/rqlite_objects.go b/pkg/kotsadm/objects/rqlite_objects.go index 21dd4fa8d8..4d77241064 100644 --- a/pkg/kotsadm/objects/rqlite_objects.go +++ b/pkg/kotsadm/objects/rqlite_objects.go @@ -92,6 +92,7 @@ func RqliteStatefulset(deployOptions types.DeployOptions, size resource.Quantity ImagePullSecrets: pullSecrets, Volumes: volumes, Affinity: &corev1.Affinity{ + NodeAffinity: defaultKOTSNodeAffinity(), PodAntiAffinity: &corev1.PodAntiAffinity{ RequiredDuringSchedulingIgnoredDuringExecution: []corev1.PodAffinityTerm{ {