From b1fb289f0fafb2471eafd54133dfe23824f313f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20K=C3=A4ldstr=C3=B6m?= Date: Sat, 26 Aug 2017 01:50:24 +0300 Subject: [PATCH] kubeadm: Move the uploadconfig phase right in the beginning of cluster init --- cmd/kubeadm/app/cmd/init.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cmd/kubeadm/app/cmd/init.go b/cmd/kubeadm/app/cmd/init.go index 1fdbd1cf82b..51b3f1cef4a 100644 --- a/cmd/kubeadm/app/cmd/init.go +++ b/cmd/kubeadm/app/cmd/init.go @@ -327,6 +327,13 @@ func (i *Init) Run(out io.Writer) error { return err } + // Upload currently used configuration to the cluster + // Note: This is done right in the beginning of cluster initialization; as we might want to make other phases + // depend on centralized information from this source in the future + if err := uploadconfigphase.UploadConfiguration(i.cfg, client); err != nil { + return err + } + // PHASE 4: Mark the master with the right label/taint if err := markmasterphase.MarkMaster(client, i.cfg.NodeName); err != nil { return err @@ -361,11 +368,6 @@ func (i *Init) Run(out io.Writer) error { // PHASE 6: Install and deploy all addons, and configure things as necessary - // Upload currently used configuration to the cluster - if err := uploadconfigphase.UploadConfiguration(i.cfg, client); err != nil { - return err - } - if err := apiconfigphase.CreateRBACRules(client, k8sVersion); err != nil { return err }