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

[feature] Support clean CRI #1435

Merged
merged 1 commit into from
Aug 16, 2022
Merged

[feature] Support clean CRI #1435

merged 1 commit into from
Aug 16, 2022

Conversation

life-
Copy link
Contributor

@life- life- commented Aug 11, 2022

What type of PR is this?

/kind feature

What this PR does / why we need it:

Sometimes, I need to delete all cri(docker/containerd) related configuration and data direcoties when delete the total cluster.

Which issue(s) this PR fixes:

Fixes #1415

Special notes for reviewers:

Does this PR introduced a user-facing change?


Additional documentation, usage docs, etc.:

./kk delete cluster -f config.yaml --all
./kk delete cluster -f config.yaml -a

@ks-ci-bot ks-ci-bot added kind/feature Categorizes issue or PR as related to a new feature. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Aug 11, 2022
@life-
Copy link
Contributor Author

life- commented Aug 11, 2022

some files changed (especially comments) after gofmt executed automatically.

@life-
Copy link
Contributor Author

life- commented Aug 11, 2022

/assign @24sama

@zaunist
Copy link
Contributor

zaunist commented Aug 12, 2022

/LGTM

@ks-ci-bot
Copy link
Collaborator

@zaunist: changing LGTM is restricted to collaborators

In response to this:

/LGTM

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

}
return pipelines.DeleteCluster(arg)
}

func (o *DeleteClusterOptions) AddFlags(cmd *cobra.Command) {
cmd.Flags().StringVarP(&o.ClusterCfgFile, "filename", "f", "", "Path to a configuration file")
cmd.Flags().StringVarP(&o.Kubernetes, "with-kubernetes", "", "", "Specify a supported version of kubernetes")
cmd.Flags().BoolVarP(&o.DeleteCRI, "all", "a", false, "Delete total cri conficutation and data directories")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Prefer to use -A

@24sama
Copy link
Collaborator

24sama commented Aug 12, 2022

Hi @life- @zaunist , thanks!

@life-
Copy link
Contributor Author

life- commented Aug 15, 2022

@24sama Thanks for your code review. I have already optimized the parameter from -a to -A.

@24sama
Copy link
Collaborator

24sama commented Aug 15, 2022

Thanks again!

/lgtm

@ks-ci-bot ks-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 15, 2022
@ks-ci-bot
Copy link
Collaborator

LGTM label has been added.

Git tree hash: 8e00ca2ec5ac13af5e75d67e79012d9d4f899226

@24sama
Copy link
Collaborator

24sama commented Aug 15, 2022

@life- It would be better if you can do the following things:

  1. Please create another PR (or just in this PR) to complement this document.
  2. Please squash your commits

@ks-ci-bot ks-ci-bot removed the lgtm Indicates that a PR is ready to be merged. label Aug 16, 2022
@life-
Copy link
Contributor Author

life- commented Aug 16, 2022

@24sama I have done the work as your suggestion! Please take your time to review the changes.

BTW, Thanks for your good suggestion!

@24sama
Copy link
Collaborator

24sama commented Aug 16, 2022

/lgtm

@ks-ci-bot ks-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 16, 2022
@ks-ci-bot
Copy link
Collaborator

LGTM label has been added.

Git tree hash: 1c7c79d32ce9ddd4d6d6d323bd312277e3e13844

@24sama
Copy link
Collaborator

24sama commented Aug 16, 2022

/approve

@ks-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 24sama, life-

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

@ks-ci-bot ks-ci-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 16, 2022
@ks-ci-bot ks-ci-bot merged commit a0e52f9 into kubesphere:master Aug 16, 2022
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. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. 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.

Add CRI clean logic when delete all the cluster
4 participants