k3s/cluster/gce
Kubernetes Submit Queue a8899b314b
Merge pull request #61241 from jpbetz/go-migrate-if-needed
Automatic merge from submit-queue. 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>.

Reimplement migrate-if-needed.sh in go

The `migrate-if-needed.sh` script was already partially implemented in go (see the attachlease and rollback sub-dirs), but was still unnecessarily difficult to understand and test.  This closely reimplements the original logic but with improved code structure, error handling and testing.

Where possible, go code that was previously executed as separate binaries is now statically linked into a single 'migrate' go cobra CLI app, which is then thinly wrapped by`migrate-if-needed.sh`.

There are numerous additional improvements that need to be made, but will be submitted in future PRs.  This PR is focused on achieving parity with the pre-existing functionality and introducing some much needed test coverage, in particular HA cluster upgrade test coverage.

It appears that the `attachlease` and `rollback` go binaries are no longer needed as standalones and so I have consolidated them into the new `migrate` go binary. Other than that, this change aims to be 100% backward compatible.

```release-note
NONE
```
2018-04-11 02:37:09 -07:00
..
addons Add cloud-provider policies to be applied via addon mgr 2018-02-15 14:49:33 -08:00
gci Fix umask to actually intended behavior. 2018-04-09 16:30:38 -07:00
manifests Merge pull request #61241 from jpbetz/go-migrate-if-needed 2018-04-11 02:37:09 -07:00
BUILD Use the pkg_tar wrapper from kubernetes/repo-infra 2018-01-18 17:10:16 -08:00
OWNERS Add jingax10 as both reviewer and approver in cluster/gce. 2018-02-21 22:11:32 -08:00
config-common.sh Add comment to gce config files advising to not use empty scopes 2017-12-18 11:33:21 -08:00
config-default.sh Merge pull request #62076 from qingling128/master 2018-04-06 09:51:32 -07:00
config-test.sh Merge pull request #61241 from jpbetz/go-migrate-if-needed 2018-04-11 02:37:09 -07:00
cos Symlink cluster/gce/cos to cluster/gce/gci 2017-03-15 15:31:51 -07:00
custom add folder named custom in gce 2018-01-05 15:36:53 -08:00
delete-stranded-load-balancers.sh
list-resources.sh cluster/gce: fix shell return value comparison. 2018-03-23 15:37:03 +02:00
ubuntu Makes cluster/gce/ubuntu to be a symlink to cluster/gce/gci and changes the gci's [master|node].yaml to enable kubernetes.target. 2017-04-25 16:19:00 -07:00
upgrade-aliases.sh Reimplement migrate-if-needed.sh in go 2018-04-10 09:19:30 -07:00
upgrade.sh Add cluster-location to GCE instance attributes 2018-02-19 10:48:25 +01:00
util.sh Fix IP-alias subnet creation logic 2018-04-06 13:23:38 +02:00