kubernetes-sigs / kind

Kubernetes IN Docker - local clusters for testing Kubernetes
https://kind.sigs.k8s.io/
Apache License 2.0
13.55k stars 1.57k forks source link

chores: add a warning message when delete a not-exists cluster #3794

Closed sword-jin closed 1 week ago

sword-jin commented 1 week ago

a typo error of clean-script cause we have more and more clusters in our test machine, and we don't observe any message.

So I think this error message is useful to help others to encounter this similar problem

k8s-ci-robot commented 1 week ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sword-jin Once this PR has been reviewed and has the lgtm label, please assign aojea for approval. For more information see the Kubernetes Code Review Process.

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

Needs approval from an approver in each of these files: - **[OWNERS](https://github.com/kubernetes-sigs/kind/blob/main/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
k8s-ci-robot commented 1 week ago

Hi @sword-jin. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
BenTheElder commented 1 week ago

It's important to understand that "clusters" are not a single object and are not merely the nodes, they are also any additional assets like kubeconfig entries. The lack of nodes does not mean we didn't need to delete kubeconfig still.

You can detect if your cleanup script has the right name by if any nodes were logged as deleted, which we already support.

Thank you, but this has been discussed extensively in the issues and I don't think we'll be going forward with it. Also per our contributor guide we'd discuss a feature like this before reviewing PRs ordinarily.

sword-jin commented 1 week ago

It's important to understand that "clusters" are not a single object and are not merely the nodes, they are also any additional assets like kubeconfig entries. The lack of nodes does not mean we didn't need to delete kubeconfig still.

You can detect if your cleanup script has the right name by if any nodes were logged as deleted, which we already support.

Thank you, but this has been discussed extensively in the issues and I don't think we'll be going forward with it. Also per our contributor guide we'd discuss a feature like this before reviewing PRs ordinarily.

oh, thanks for the context, make sense, I'll close this PR

BenTheElder commented 1 week ago

Thanks!