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

Improve kubeone reset output #1474

Merged
merged 1 commit into from
Aug 29, 2021
Merged

Improve kubeone reset output #1474

merged 1 commit into from
Aug 29, 2021

Conversation

xmudrii
Copy link
Member

@xmudrii xmudrii commented Aug 29, 2021

What this PR does / why we need it:

The kubeone reset output currently looks like this:

WARN[16:53:00 CEST] this command will require an explicit confirmation starting with the next minor release (v1.3) 
The following nodes will be reset. The Kubernetes cluster running on those nodes will be permanently destroyed 
	- reset control plane node "marko-1-cp-0" (10.0.42.9)
	- reset control plane node "marko-1-cp-1" (10.0.42.14)
	- reset control plane node "marko-1-cp-2" (10.0.42.5)
INFO[16:53:00 CEST] Building Kubernetes clientset...             
	- reset machine-controller managed machine "marko-1-pool1-57494466fb-rsx4b"

There are several issues with the output:

  • the Building Kubernetes clientset... is in between a list of control plane nodes and Machines, which doesn't look nice
  • reset machine-controller managed machine is wrong in this context because the Machine is actually destroyed
  • the warning is outdated because the command already requires an explicit confirmation
  • the Kubernetes clientset will be built again after confirming the command which is not needed at all

This PR is supposed to fix those issues and add some additional context to the output. With this PR, the output looks like this:

INFO[18:25:44 CEST] Building Kubernetes clientset...             
WARN[18:25:50 CEST] This command will PERMANENTLY destroy the Kubernetes cluster running on the following nodes: 
	- reset control plane node "marko-1-cp-0" (10.0.42.3)
	- reset control plane node "marko-1-cp-1" (10.0.42.8)
	- reset control plane node "marko-1-cp-2" (10.0.42.14)

The following machine-controller managed worker nodes will be destroyed:
	- kube-system/marko-1-pool1-5df867f674-vp8kg

After the command is complete, there's NO way to recover the cluster or its data! 
Do you want to proceed (yes/no): yes

INFO[18:25:54 CEST] Destroying worker nodes...                   
INFO[18:25:55 CEST] Annotating nodes to skip eviction...         
INFO[18:25:56 CEST] Deleting MachineDeployment objects...   
...

Does this PR introduce a user-facing change?:

NONE

/assign @kron4eg

Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
@xmudrii xmudrii requested a review from kron4eg August 29, 2021 16:45
@kubermatic-bot kubermatic-bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Denotes that all commits in the pull request have the valid DCO signoff message. labels Aug 29, 2021
@kubermatic-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xmudrii

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 29, 2021
@kubermatic-bot kubermatic-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 29, 2021
@kubermatic-bot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 2d2f3383ca33811f1b26061d26f4d1b8374bf0e5

@kubermatic-bot kubermatic-bot merged commit d5733ef into master Aug 29, 2021
@kubermatic-bot kubermatic-bot added this to the KubeOne 1.3 milestone Aug 29, 2021
@kubermatic-bot kubermatic-bot deleted the improve-reset-output branch August 29, 2021 20:17
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-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants