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,
|
Framework: f,
|
||||||
ClientNodeSelection: e2epod.NodeSelection{Name: d.ClientNodeName},
|
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
|
return e2econfig
|
||||||
}
|
}
|
||||||
|
@ -165,15 +165,16 @@ func (p *provisioningTestSuite) DefineTests(driver storageframework.TestDriver,
|
|||||||
}, l.config.Framework.Namespace.Name)
|
}, l.config.Framework.Namespace.Name)
|
||||||
framework.Logf("In creating storage class object and pvc objects for driver - sc: %v, pvc: %v, src-pvc: %v", l.sc, l.pvc, l.sourcePVC)
|
framework.Logf("In creating storage class object and pvc objects for driver - sc: %v, pvc: %v, src-pvc: %v", l.sc, l.pvc, l.sourcePVC)
|
||||||
l.testCase = &StorageClassTest{
|
l.testCase = &StorageClassTest{
|
||||||
Client: l.config.Framework.ClientSet,
|
Client: l.config.Framework.ClientSet,
|
||||||
Timeouts: f.Timeouts,
|
Timeouts: f.Timeouts,
|
||||||
Claim: l.pvc,
|
Claim: l.pvc,
|
||||||
SourceClaim: l.sourcePVC,
|
SourceClaim: l.sourcePVC,
|
||||||
Class: l.sc,
|
Class: l.sc,
|
||||||
Provisioner: l.sc.Provisioner,
|
Provisioner: l.sc.Provisioner,
|
||||||
ClaimSize: claimSize,
|
ClaimSize: claimSize,
|
||||||
ExpectedSize: claimSize,
|
ExpectedSize: claimSize,
|
||||||
VolumeMode: pattern.VolMode,
|
VolumeMode: pattern.VolMode,
|
||||||
|
NodeSelection: l.config.ClientNodeSelection,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -325,7 +325,7 @@ func (t *topologyTestSuite) createResources(ctx context.Context, cs clientset.In
|
|||||||
podConfig := e2epod.Config{
|
podConfig := e2epod.Config{
|
||||||
NS: l.config.Framework.Namespace.Name,
|
NS: l.config.Framework.Namespace.Name,
|
||||||
PVCs: []*v1.PersistentVolumeClaim{l.resource.Pvc},
|
PVCs: []*v1.PersistentVolumeClaim{l.resource.Pvc},
|
||||||
NodeSelection: e2epod.NodeSelection{Affinity: affinity},
|
NodeSelection: e2epod.NodeSelection{Affinity: affinity, Selector: l.config.ClientNodeSelection.Selector},
|
||||||
SeLinuxLabel: e2epod.GetLinuxLabel(),
|
SeLinuxLabel: e2epod.GetLinuxLabel(),
|
||||||
ImageID: e2epod.GetDefaultTestImageID(),
|
ImageID: e2epod.GetDefaultTestImageID(),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user