-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KUDO init --upgrade #1505
KUDO init --upgrade #1505
Conversation
Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
renamed validate option to verify Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
Signed-off-by: Andreas Neumann <aneumann@mesosphere.com> # Conflicts: # hack/run-e2e-tests.sh # pkg/kudoctl/cmd/init.go # pkg/kudoctl/kudoinit/manager/manager.go # pkg/kudoctl/kudoinit/options.go
Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
Signed-off-by: Andreas Neumann <aneumann@mesosphere.com> # Conflicts: # hack/run-e2e-tests.sh # pkg/kudoctl/cmd/init.go # pkg/kudoctl/cmd/init_integration_test.go # pkg/kudoctl/kudoinit/manager/manager.go # pkg/kudoctl/kudoinit/options.go # pkg/kudoctl/kudoinit/prereq/namespace_test.go # pkg/kudoctl/kudoinit/prereq/serviceaccount_test.go # pkg/kudoctl/kudoinit/prereq/webhook_test.go
Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
Signed-off-by: Andreas Neumann <aneumann@mesosphere.com> # Conflicts: # hack/run-e2e-tests.sh # pkg/kudoctl/cmd/init.go # pkg/kudoctl/cmd/init_test.go # pkg/kudoctl/kudoinit/prereq/webhook.go # pkg/kudoctl/kudoinit/setup/setup.go
Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
# Conflicts: # pkg/kudoctl/kudoinit/prereq/webhook.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I left a few questions/comments
Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from more user-friendly output for invalid parameters and some console output for happy checks, this lgtm. But since this is a bit involved, I'd like for another pair of 👀 before we merge it 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Added more debug output Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
Signed-off-by: Andreas Neumann <aneumann@mesosphere.com> # Conflicts: # pkg/kudoctl/kudoinit/crd/crds.go # pkg/kudoctl/kudoinit/manager/manager.go
} | ||
|
||
// Upgrade an existing KUDO installation | ||
func (i *Installer) Upgrade(client *kube.Client) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use a Patch instead of deleting/re-installing:
https://github.com/kubernetes/client-go/blob/master/kubernetes/typed/apps/v1/statefulset.go#L50
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could - We actually patch the CRDs, but for the Service and statefulset this would involve either manually creating the patch, or saving the old version in annotations, similar to TaskApply. Delete/Recreate is a lot easier. We may come back to patching later on though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
Holding the merge until after KUDO v0.15.0 is released |
What this PR does / why we need it:
Add
kudo init --upgrade
to upgrade an existing KUDO installationAdd
kudo init --verify
to check the state of an existing KUDO installationkudo init
without any flag will now complain if it is run on a cluster that has an existing KUDO installation (to prevent accidental upgrades)Added migration framework - There are no actual migrations in there at the moment, but the upgrade path is there to add them when we need them
Added basic upgrade test in the e2e section - This might need some update if we're going to add more tests here, as we probably want a fresh kind-cluster for each test. They're probably going to be the most expensive tests we do
The new branch, because refactoring was extracted from the old #1467 Also fixes DCO issues from the old branch.
Fixes #891