Merge pull request #63076 from chuckha/etcdprepull

Automatic merge from submit-queue (batch tested with PRs 59965, 59115, 63076, 63059). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Prepull etcd before an upgrade

If kubeadm ever has to upgrade etcd it should prepull the image so
there is less downtime during the upgrade when etcd versions change.

Fixes kubernetes/kubeadm#669

Signed-off-by: Chuck Ha <ha.chuck@gmail.com>

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

This PR Prepulls the etcd image during a `kubeadm upgrade apply`.

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

Fixes kubernetes/kubeadm#669

**Special notes for your reviewer**:

constants.MasterComponents was not changed because it is used in many places where etcd does not need to be nor should it be a part of this slice.

**Release note**:
```release-note
NONE
```

/cc @kubernetes/sig-cluster-lifecycle-pr-reviews
pull/8/head
Kubernetes Submit Queue 2018-04-25 17:07:14 -07:00 committed by GitHub
commit 2a10c309aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ func (d *DaemonSetPrepuller) DeleteFunc(component string) error {
// PrepullImagesInParallel creates DaemonSets synchronously but waits in parallel for the images to pull
func PrepullImagesInParallel(kubePrepuller Prepuller, timeout time.Duration) error {
componentsToPrepull := constants.MasterComponents
componentsToPrepull := append(constants.MasterComponents, constants.Etcd)
fmt.Printf("[upgrade/prepull] Will prepull images for components %v\n", componentsToPrepull)
timeoutChan := time.After(timeout)