From 1eb2e60dbf2744e105aac4cdcc8379138e3cb5bc Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Wed, 25 Jan 2017 12:16:03 -0400 Subject: [PATCH] Wait for the self-hosted control plane during kubeadm init. 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. --- cmd/kubeadm/app/master/selfhosted.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/kubeadm/app/master/selfhosted.go b/cmd/kubeadm/app/master/selfhosted.go index 031a1a74dd4..f07dd09bd47 100644 --- a/cmd/kubeadm/app/master/selfhosted.go +++ b/cmd/kubeadm/app/master/selfhosted.go @@ -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 {