-
Notifications
You must be signed in to change notification settings - Fork 80
Prevent deletion of namespaces and cluster #651
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a01a61b to
5f41a3a
Compare
Signed-off-by: Dharmit Shah <dharmit.shah@suse.com>
5f41a3a to
502d27f
Compare
e5d733b to
957ae82
Compare
crobby
reviewed
Feb 20, 2025
Collaborator
crobby
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple comments on the error messages. If you're passionate about the way they are, I can live with them, but I think they could be better.
Signed-off-by: Dharmit Shah <dharmit.shah@suse.com>
It prevents deletion of both clusters.provisioning.cattle.io and cluster.management.cattle.io resources of the named local.
957ae82 to
f312334
Compare
Contributor
Author
|
@crobby I modified the error message for all deletions. PTAL. :) |
crobby
approved these changes
Feb 20, 2025
tomleb
approved these changes
Feb 21, 2025
dharmit
added a commit
to dharmit/rancher-webhook
that referenced
this pull request
Feb 24, 2025
* Ignore namespace delete operation Signed-off-by: Dharmit Shah <dharmit.shah@suse.com> * Prevent deletion of `local` and `fleet-local` namespaces Signed-off-by: Dharmit Shah <dharmit.shah@suse.com> * Prevent deletion of local cluster It prevents deletion of both clusters.provisioning.cattle.io and cluster.management.cattle.io resources of the named local. * Fixes to tests based on CI feedback --------- Signed-off-by: Dharmit Shah <dharmit.shah@suse.com>
2 tasks
dharmit
added a commit
to dharmit/rancher-webhook
that referenced
this pull request
Feb 24, 2025
* Ignore namespace delete operation Signed-off-by: Dharmit Shah <dharmit.shah@suse.com> * Prevent deletion of `local` and `fleet-local` namespaces Signed-off-by: Dharmit Shah <dharmit.shah@suse.com> * Prevent deletion of local cluster It prevents deletion of both clusters.provisioning.cattle.io and cluster.management.cattle.io resources of the named local. * Fixes to tests based on CI feedback --------- Signed-off-by: Dharmit Shah <dharmit.shah@suse.com>
This was referenced Feb 24, 2025
dharmit
added a commit
that referenced
this pull request
Mar 6, 2025
* Ignore namespace delete operation * Prevent deletion of `local` and `fleet-local` namespaces * Prevent deletion of local cluster It prevents deletion of both clusters.provisioning.cattle.io and cluster.management.cattle.io resources of the named local. * Fixes to tests based on CI feedback --------- Signed-off-by: Dharmit Shah <dharmit.shah@suse.com>
dharmit
added a commit
that referenced
this pull request
Mar 6, 2025
* Ignore namespace delete operation * Prevent deletion of `local` and `fleet-local` namespaces * Prevent deletion of local cluster It prevents deletion of both clusters.provisioning.cattle.io and cluster.management.cattle.io resources of the named local. * Fixes to tests based on CI feedback --------- Signed-off-by: Dharmit Shah <dharmit.shah@suse.com>
This was referenced Mar 28, 2025
This was referenced Jul 28, 2025
This was referenced Nov 19, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue:
rancher/rancher#32745
rancher/rancher#48303
Problem
localcluster (both kindsclusters.provisioning.cattle.ioandcluster.management.cattle.io) usingkubectl deletecommands.localandfleet-localnamespaces usingkubectl delete.Solution
All aforementioned deletions can be prevented using the proposed PR.
CheckList