mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 04:33:26 +00:00
Use actual node hostname during test "EmptyDir Wrapper Volume, ConfigMap volumes, no race"
This commit is contained in:
parent
d95b9f16d1
commit
cf7a8935af
@ -342,6 +342,8 @@ func makeConfigMapVolumes(configMapNames []string) (volumes []v1.Volume, volumeM
|
|||||||
}
|
}
|
||||||
|
|
||||||
func testNoWrappedVolumeRace(f *framework.Framework, volumes []v1.Volume, volumeMounts []v1.VolumeMount, podCount int32) {
|
func testNoWrappedVolumeRace(f *framework.Framework, volumes []v1.Volume, volumeMounts []v1.VolumeMount, podCount int32) {
|
||||||
|
const nodeHostnameLabelKey = "kubernetes.io/hostname"
|
||||||
|
|
||||||
rcName := wrappedVolumeRaceRCNamePrefix + string(uuid.NewUUID())
|
rcName := wrappedVolumeRaceRCNamePrefix + string(uuid.NewUUID())
|
||||||
nodeList := framework.GetReadySchedulableNodesOrDie(f.ClientSet)
|
nodeList := framework.GetReadySchedulableNodesOrDie(f.ClientSet)
|
||||||
Expect(len(nodeList.Items)).To(BeNumerically(">", 0))
|
Expect(len(nodeList.Items)).To(BeNumerically(">", 0))
|
||||||
@ -355,9 +357,9 @@ func testNoWrappedVolumeRace(f *framework.Framework, volumes []v1.Volume, volume
|
|||||||
{
|
{
|
||||||
MatchExpressions: []v1.NodeSelectorRequirement{
|
MatchExpressions: []v1.NodeSelectorRequirement{
|
||||||
{
|
{
|
||||||
Key: "kubernetes.io/hostname",
|
Key: nodeHostnameLabelKey,
|
||||||
Operator: v1.NodeSelectorOpIn,
|
Operator: v1.NodeSelectorOpIn,
|
||||||
Values: []string{targetNode.Name},
|
Values: []string{targetNode.Labels[nodeHostnameLabelKey]},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user