Skip to content

Commit d2971b5

Browse files
Daemon Sets use Driver Plugin Spec Affinity
the node plugin and other Daemon sets should use the affinty specified in the driver. Example: role=storage-node where non storage-node(s) don't require the node plugin Signed-off-by: Dan Rutledge <[email protected]>
1 parent 365807c commit d2971b5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

internal/controller/driver_controller.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,6 +1118,7 @@ func (r *driverReconcile) reconcileNodePluginDaemonSetForCsiAddons() error {
11181118
// resolved through k8s service, set dns policy to cluster first
11191119
DNSPolicy: corev1.DNSClusterFirstWithHostNet,
11201120
Tolerations: pluginSpec.Tolerations,
1121+
Affinity: pluginSpec.Affinity,
11211122
Containers: utils.Call(func() []corev1.Container {
11221123
containers := []corev1.Container{
11231124
{
@@ -1293,6 +1294,7 @@ func (r *driverReconcile) reconcileNodePluginDaemonSet() error {
12931294
// resolved through k8s service, set dns policy to cluster first
12941295
DNSPolicy: corev1.DNSClusterFirstWithHostNet,
12951296
Tolerations: pluginSpec.Tolerations,
1297+
Affinity: pluginSpec.Affinity,
12961298
Containers: utils.Call(func() []corev1.Container {
12971299
containers := []corev1.Container{
12981300
// Node Plugin Container

0 commit comments

Comments
 (0)