k3s/cluster/kubemark
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
..
gce Merge pull request #61241 from jpbetz/go-migrate-if-needed 2018-04-11 02:37:09 -07:00
pre-existing Launch kubemark with an existing Kubemark Master 2017-07-05 09:14:53 -04:00
OWNERS Added OWNERS to kubemark subdirectories 2017-01-25 14:37:57 +01:00
util.sh Refactored kubemark code into provider-specific and provider-independent parts [Part-1] 2017-01-26 22:54:14 +01:00