Skip to content
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

Delete worker nodes using dynamic client and add an option to remove Kubernetes packages when resetting the cluster #450

Merged
merged 10 commits into from
May 17, 2019

Conversation

xmudrii
Copy link
Member

@xmudrii xmudrii commented May 15, 2019

What this PR does / why we need it:

This PR refactors the reset command to use dynamic client instead of kubectl over SSH tunnel for deleting worker nodes.

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 #447
Fixes #397

Release note:

Fix reset failures if there are no Machine objects or Cluster-API CRDs are not deployed
Add the --remove-binaries flag which removes Kubernetes binaries after resetting the cluster

/assign @kron4eg

@xmudrii xmudrii requested a review from kron4eg May 15, 2019 09:07
@kubermatic-bot kubermatic-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 15, 2019
@xmudrii
Copy link
Member Author

xmudrii commented May 15, 2019

This is a yamled flake.
/retest

Makefile Show resolved Hide resolved
pkg/templates/machinecontroller/helper.go Outdated Show resolved Hide resolved
@xmudrii
Copy link
Member Author

xmudrii commented May 15, 2019

/hold
I'll take care of #397 as well

@kubermatic-bot kubermatic-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 15, 2019
@xmudrii xmudrii force-pushed the reset-refactor branch 2 times, most recently from 437119e to 0f8924e Compare May 15, 2019 11:27
@xmudrii
Copy link
Member Author

xmudrii commented May 15, 2019

/hold cancel

@kubermatic-bot kubermatic-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 15, 2019
@xmudrii xmudrii changed the title Delete worker nodes using dynamic client Delete worker nodes using dynamic client and add option to remove Kubernetes packages when resetting the cluster May 15, 2019
@xmudrii xmudrii changed the title Delete worker nodes using dynamic client and add option to remove Kubernetes packages when resetting the cluster Delete worker nodes using dynamic client and add an option to remove Kubernetes packages when resetting the cluster May 15, 2019
Copy link
Member

@kron4eg kron4eg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label May 15, 2019
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 22c717ce640379a500d732f33d90bc5826655e2f

@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kron4eg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubermatic-bot kubermatic-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 15, 2019
@xmudrii
Copy link
Member Author

xmudrii commented May 15, 2019

/retest

4 similar comments
@xmudrii
Copy link
Member Author

xmudrii commented May 15, 2019

/retest

@xmudrii
Copy link
Member Author

xmudrii commented May 15, 2019

/retest

@xmudrii
Copy link
Member Author

xmudrii commented May 15, 2019

/retest

@kron4eg
Copy link
Member

kron4eg commented May 15, 2019

/retest

@xmudrii
Copy link
Member Author

xmudrii commented May 15, 2019

/hold
This is a second flake related to reset not being able to delete the MachineSet. It should be fixed before merging the PR.

@kubermatic-bot kubermatic-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 15, 2019
Signed-off-by: Marko Mudrinić <[email protected]>
Signed-off-by: Marko Mudrinić <[email protected]>
@kubermatic-bot kubermatic-bot removed the lgtm Indicates that a PR is ready to be merged. label May 17, 2019
pkg/cmd/reset.go Outdated Show resolved Hide resolved
@kron4eg
Copy link
Member

kron4eg commented May 17, 2019

/lgtm

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label May 17, 2019
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 0bc88130481e2caa7324654ea5ec7ecb254678cb

Signed-off-by: Marko Mudrinić <[email protected]>
@kubermatic-bot kubermatic-bot removed the lgtm Indicates that a PR is ready to be merged. label May 17, 2019
@kron4eg
Copy link
Member

kron4eg commented May 17, 2019

/lgtm

@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label May 17, 2019
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: ea8e1b3181fe166f144429b64e33f9f289b9505f

@kron4eg
Copy link
Member

kron4eg commented May 17, 2019

/retest

@kron4eg
Copy link
Member

kron4eg commented May 17, 2019

/hold cancel

@kubermatic-bot kubermatic-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 17, 2019
@kubermatic-bot kubermatic-bot merged commit 8f9092d into master May 17, 2019
@kubermatic-bot kubermatic-bot deleted the reset-refactor branch May 17, 2019 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error: the server doesn't have a resource type "machinedeployment" Reset doesn't remove Kubernetes binaries
3 participants