Skip to content

Commit

Permalink
Add default node affinity rules to rqlite and minio (#4337)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgalsaleh authored Jan 8, 2024
1 parent 71efd1a commit 9f8bfa3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/kotsadm/objects/minio_objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions pkg/kotsadm/objects/rqlite_objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
{
Expand Down

0 comments on commit 9f8bfa3

Please sign in to comment.