Merge pull request #133122 from vr4manta/automated-cherry-pick-of-#132891-upstream-release-1.33

Automated cherry pick of #132891: Added NodeSelectors field to external DriverDefinition
This commit is contained in:
Kubernetes Prow Robot
2025-09-04 02:27:16 -07:00
committed by GitHub

View File

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