From d8676a24cc1029b8ffb3fccc11ca3dcb00b97c8c Mon Sep 17 00:00:00 2001 From: vr4manta Date: Fri, 11 Jul 2025 08:23:44 -0400 Subject: [PATCH] Added NodeSelectors field to DriverDefinition --- test/e2e/storage/external/external.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/e2e/storage/external/external.go b/test/e2e/storage/external/external.go index 60bbeae8968..67853d638ff 100644 --- a/test/e2e/storage/external/external.go +++ b/test/e2e/storage/external/external.go @@ -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 }