-
Notifications
You must be signed in to change notification settings - Fork 63
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
Prevent deletion of local
cluster
#551
base: main
Are you sure you want to change the base?
Conversation
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.
Given that "local"
already appears in that file, I would set it to a constant called localCluster
, like in pkg/resolvers/grbRuleResolvers.go
960be01
to
e55d06d
Compare
18fa0d4
to
eae9a9d
Compare
eae9a9d
to
755a636
Compare
755a636
to
7a70d08
Compare
It prevents deletion of both clusters.provisioning.cattle.io and cluster.management.cattle.io of the name `local`. Signed-off-by: Dharmit Shah <[email protected]>
Signed-off-by: Dharmit Shah <[email protected]>
Signed-off-by: Dharmit Shah <[email protected]>
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.
LGTM, but just wanted to confirm that the agent's CLUSTER_CLEANUP
is unimpacted.
Issue:
rancher/rancher#32745
rancher/rancher#48303
Problem
Presently, it's possible to delete the
local
cluster using:$ k delete cluster.management.cattle.io local
Other ways the
local
cluster, one on which Rancher is deployed, could be corrupted are mentioned in rancher/rancher#48303.Solution
Prevent
local
cluster deletion:Prevent deletion of
local
andfleet-local
namespaces:CheckList