Skip to content

Commit 83bf276

Browse files
committed
Respect Tolerations and Affinity set in IBMObjectCSI CR
Ensure that the csi-driver DaemonSet get's created with the tolerations and affinities configured within the IBMObjectCSI custom resource Signed-off-by: Benjamin Isinger <[email protected]>
1 parent 453b734 commit 83bf276

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

controllers/syncer/csi_node.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,11 @@ func (s *csiNodeSyncer) ensurePodSpec() corev1.PodSpec {
9191
Containers: s.ensureContainersSpec(),
9292
Volumes: s.ensureVolumes(),
9393
SecurityContext: &corev1.PodSecurityContext{
94-
RunAsNonRoot: func(b bool) *bool { return &b }(true),
94+
RunAsNonRoot: util.True(),
9595
RunAsUser: func(uid int64) *int64 { return &uid }(2121),
9696
},
97+
Affinity: s.driver.Spec.Node.Affinity,
98+
Tolerations: s.driver.Spec.Node.Tolerations,
9799
ServiceAccountName: constants.GetResourceName(constants.CSINodeServiceAccount),
98100
PriorityClassName: constants.CSINodePriorityClassName,
99101
}

0 commit comments

Comments
 (0)