mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 18:24:07 +00:00
e2e/framework/util.StartPods: don't wait for pods that are not created
This commit is contained in:
parent
caa96f4cf3
commit
59fc509fb7
@ -2095,6 +2095,11 @@ func (config *RCConfig) start() error {
|
|||||||
// Simplified version of RunRC, that does not create RC, but creates plain Pods.
|
// Simplified version of RunRC, that does not create RC, but creates plain Pods.
|
||||||
// optionally waits for pods to start running (if waitForRunning == true)
|
// optionally waits for pods to start running (if waitForRunning == true)
|
||||||
func StartPods(c *client.Client, replicas int, namespace string, podNamePrefix string, pod api.Pod, waitForRunning bool) {
|
func StartPods(c *client.Client, replicas int, namespace string, podNamePrefix string, pod api.Pod, waitForRunning bool) {
|
||||||
|
// no pod to start
|
||||||
|
if replicas < 1 {
|
||||||
|
Logf("No pod to start, skipping...")
|
||||||
|
return
|
||||||
|
}
|
||||||
startPodsID := string(util.NewUUID()) // So that we can label and find them
|
startPodsID := string(util.NewUUID()) // So that we can label and find them
|
||||||
for i := 0; i < replicas; i++ {
|
for i := 0; i < replicas; i++ {
|
||||||
podName := fmt.Sprintf("%v-%v", podNamePrefix, i)
|
podName := fmt.Sprintf("%v-%v", podNamePrefix, i)
|
||||||
|
Loading…
Reference in New Issue
Block a user