mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-17 11:28:58 +00:00
Added NodeSelectors field to DriverDefinition
This commit is contained in:
11
test/e2e/storage/external/external.go
vendored
11
test/e2e/storage/external/external.go
vendored
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user