-
Notifications
You must be signed in to change notification settings - Fork 922
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
Dangerous behaviour to not fail on -n <namespace> --all
#1272
Comments
@m0un10: This issue is currently awaiting triage. SIG CLI takes a lead on issue triage for this repo, but any Kubernetes member can accept issues by applying the The 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. |
This seems like a similar failure mode as prune (kubernetes/kubernetes#110905) There are probably a few cases where this might happen:
As @m0un10 said, it does print a warning saying @KnVerey thoughts on this? Should this be handled in a way similar to pruning cluster-scoped resources? |
I agree with you on the conceptual similarities, but unlike pruning (which is an alpha flag), Duplicate of #1056 and many others linked from the mailing list thread. cc @eddiezane |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
What happened:
I accidentally ran
kubectl delete crd -n <namespace> --all
. It deleted all of my CRDs and broke my cluster beyond repair.It warned that the CRD isn't namespaced but it didn't fail.
What you expected to happen:
I expect if
-n <namespace> --all
is set that it should fail indicating that it's a namespaced resource as opposed to simply warning. The warning is useless when the deletion has already happened to everything. Seems like a modern and more dangerous equivalent ofrm -rf $unsetvar/
but more preventable.How to reproduce it (as minimally and precisely as possible):
kubectl delete crd -n <namespace> --all
Anything else we need to know?:
Environment:
kubectl version
):cat /etc/os-release
):The text was updated successfully, but these errors were encountered: