Merge pull request #40429 from dgoodwin/self-hosted-wait

Automatic merge from submit-queue

Wait for the self-hosted control plane during kubeadm init.

**What this PR does / why we need it**:

Currently we are completing kubeadm init while the scheduler and
controller manager are likely still not yet up. In some cases if they
will fail, they won't ever come up.

Instead wait until each pod enters running state before exiting kubeadm.

**Release note**:

```release-note
NONE
```
pull/6/head
Kubernetes Submit Queue 2017-01-25 13:26:05 -08:00 committed by GitHub
commit 61d4a71853
1 changed files with 2 additions and 2 deletions

View File

@ -117,7 +117,7 @@ func launchSelfHostedControllerManager(cfg *kubeadmapi.MasterConfiguration, clie
return fmt.Errorf("failed to create self-hosted %q deployment [%v]", kubeControllerManager, err)
}
waitForPodsWithLabel(client, "self-hosted-"+kubeControllerManager, false)
waitForPodsWithLabel(client, "self-hosted-"+kubeControllerManager, true)
ctrlMgrStaticManifestPath := buildStaticManifestFilepath(kubeControllerManager)
if err := os.RemoveAll(ctrlMgrStaticManifestPath); err != nil {
@ -136,7 +136,7 @@ func launchSelfHostedScheduler(cfg *kubeadmapi.MasterConfiguration, client *clie
return fmt.Errorf("failed to create self-hosted %q deployment [%v]", kubeScheduler, err)
}
waitForPodsWithLabel(client, "self-hosted-"+kubeScheduler, false)
waitForPodsWithLabel(client, "self-hosted-"+kubeScheduler, true)
schedulerStaticManifestPath := buildStaticManifestFilepath(kubeScheduler)
if err := os.RemoveAll(schedulerStaticManifestPath); err != nil {