mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-25 20:29:56 +00:00
Wait for default serviceaccount in e2e createTestingNS
This commit is contained in:
@@ -311,8 +311,14 @@ func createTestingNS(baseName string, c *client.Client) (*api.Namespace, error)
|
|||||||
Status: api.NamespaceStatus{},
|
Status: api.NamespaceStatus{},
|
||||||
}
|
}
|
||||||
_, err := c.Namespaces().Create(namespaceObj)
|
_, err := c.Namespaces().Create(namespaceObj)
|
||||||
|
if err != nil {
|
||||||
return namespaceObj, err
|
return namespaceObj, err
|
||||||
}
|
}
|
||||||
|
if err := waitForDefaultServiceAccountInNamespace(c, namespaceObj.Name); err != nil {
|
||||||
|
return namespaceObj, err
|
||||||
|
}
|
||||||
|
return namespaceObj, nil
|
||||||
|
}
|
||||||
|
|
||||||
func waitForPodRunningInNamespace(c *client.Client, podName string, namespace string) error {
|
func waitForPodRunningInNamespace(c *client.Client, podName string, namespace string) error {
|
||||||
return waitForPodCondition(c, namespace, podName, "running", podPoll, podStartTimeout, func(pod *api.Pod) (bool, error) {
|
return waitForPodCondition(c, namespace, podName, "running", podPoll, podStartTimeout, func(pod *api.Pod) (bool, error) {
|
||||||
|
Reference in New Issue
Block a user