Merge pull request #51363 from luxas/move_uploadconfig

Automatic merge from submit-queue (batch tested with PRs 51174, 51363, 51087, 51382, 51388)

kubeadm: Move the uploadconfig phase right in the beginning of cluster init

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

In order to be forwards-compatible, I'm moving the uploadconfig to be the first thing in the chain in order to make it possible to rely on it being present in future releases when we have a beta or higher API to rely on.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
@kubernetes/sig-cluster-lifecycle-pr-reviews
This commit is contained in:
Kubernetes Submit Queue 2017-08-26 06:43:27 -07:00 committed by GitHub
commit 41a06d1fbb

View File

@ -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
}