@@ -152,6 +152,12 @@ type driverDefinition struct {
152
152
// use topology to ensure that pods land on the right node(s).
153
153
ClientNodeName string
154
154
155
+ // NodeSelectors is used to specify nodeSelector information for pod deployment
156
+ // during the tests. This is beneficial when needing to control placement
157
+ // for specialized environments. Most drivers should not need this and
158
+ // instead can use topolgy to ensure that pods land on the right node(s).
159
+ NodeSelectors map [string ]string
160
+
155
161
// Timeouts contains the custom timeouts used during the test execution.
156
162
// The values specified here will override the default values specified in
157
163
// the framework.TimeoutContext struct.
@@ -493,5 +499,10 @@ func (d *driverDefinition) PrepareTest(ctx context.Context, f *framework.Framewo
493
499
e2econfig .ClientNodeSelection .Selector = map [string ]string {"kubernetes.io/os" :"linux" }
494
500
}
495
501
502
+ // Add all provided nodeSelector settings
503
+ for key ,value := range d .NodeSelectors {
504
+ e2econfig .ClientNodeSelection .Selector [key ]= value
505
+ }
506
+
496
507
return e2econfig
497
508
}