mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 18:02:01 +00:00
Add nodeSelector to e2e storage testing pods
Signed-off-by: torredil <torredil@amazon.com>
This commit is contained in:
parent
c4ebbeeb74
commit
25389ee0ee
7
test/e2e/storage/external/external.go
vendored
7
test/e2e/storage/external/external.go
vendored
@ -422,5 +422,12 @@ func (d *driverDefinition) PrepareTest(ctx context.Context, f *framework.Framewo
|
||||
Framework: f,
|
||||
ClientNodeSelection: e2epod.NodeSelection{Name: d.ClientNodeName},
|
||||
}
|
||||
|
||||
if framework.NodeOSDistroIs("windows") {
|
||||
e2econfig.ClientNodeSelection.Selector = map[string]string{"kubernetes.io/os": "windows"}
|
||||
} else {
|
||||
e2econfig.ClientNodeSelection.Selector = map[string]string{"kubernetes.io/os": "linux"}
|
||||
}
|
||||
|
||||
return e2econfig
|
||||
}
|
||||
|
@ -174,6 +174,7 @@ func (p *provisioningTestSuite) DefineTests(driver storageframework.TestDriver,
|
||||
ClaimSize: claimSize,
|
||||
ExpectedSize: claimSize,
|
||||
VolumeMode: pattern.VolMode,
|
||||
NodeSelection: l.config.ClientNodeSelection,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -325,7 +325,7 @@ func (t *topologyTestSuite) createResources(ctx context.Context, cs clientset.In
|
||||
podConfig := e2epod.Config{
|
||||
NS: l.config.Framework.Namespace.Name,
|
||||
PVCs: []*v1.PersistentVolumeClaim{l.resource.Pvc},
|
||||
NodeSelection: e2epod.NodeSelection{Affinity: affinity},
|
||||
NodeSelection: e2epod.NodeSelection{Affinity: affinity, Selector: l.config.ClientNodeSelection.Selector},
|
||||
SeLinuxLabel: e2epod.GetLinuxLabel(),
|
||||
ImageID: e2epod.GetDefaultTestImageID(),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user