-
Notifications
You must be signed in to change notification settings - Fork 39.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor e2e node selection #88059
Refactor e2e node selection #88059
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,12 +128,8 @@ type TestConfig struct { | |
// Wait for the pod to terminate successfully | ||
// False indicates that the pod is long running | ||
WaitForCompletion bool | ||
// ServerNodeName is the spec.nodeName to run server pod on. Default is any node. | ||
ServerNodeName string | ||
// ClientNodeName is the spec.nodeName to run client pod on. Default is any node. | ||
ClientNodeName string | ||
// NodeSelector to use in pod spec (server, client and injector pods). | ||
NodeSelector map[string]string | ||
// ClientNodeSelection restricts where the client pod runs on. Default is any node. | ||
ClientNodeSelection e2epod.NodeSelection | ||
} | ||
|
||
// Test contains a volume to mount into a client pod and its | ||
|
@@ -297,8 +293,6 @@ func startVolumeServer(client clientset.Interface, config TestConfig) *v1.Pod { | |
}, | ||
Volumes: volumes, | ||
RestartPolicy: restartPolicy, | ||
NodeName: config.ServerNodeName, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the only place where There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. correct, nothing is using it, so I just removed it. |
||
NodeSelector: config.NodeSelector, | ||
}, | ||
} | ||
|
||
|
@@ -389,10 +383,9 @@ func runVolumeTesterPod(client clientset.Interface, config TestConfig, podSuffix | |
TerminationGracePeriodSeconds: &gracePeriod, | ||
SecurityContext: GeneratePodSecurityContext(fsGroup, seLinuxOptions), | ||
Volumes: []v1.Volume{}, | ||
NodeName: config.ClientNodeName, | ||
NodeSelector: config.NodeSelector, | ||
}, | ||
} | ||
e2epod.SetNodeSelection(clientPod, config.ClientNodeSelection) | ||
|
||
for i, test := range tests { | ||
volumeName := fmt.Sprintf("%s-%s-%d", config.Prefix, "volume", i) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -988,7 +988,8 @@ func makeLocalPodWithNodeName(config *localTestConfig, volume *localTestVolume, | |
if pod == nil { | ||
return | ||
} | ||
pod.Spec.NodeName = nodeName | ||
|
||
e2epod.SetNodeAffinity(pod, nodeName) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not gonna use the fancy There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not at the moment. The local storage tests are specific to single nodes. |
||
return | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to still have a seperate
ServerNodeSelection
? suspicious that this disappeared