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

How to prevent deletion of resources for member clusters? #3004

Closed
chaunceyjiang opened this issue Dec 29, 2022 · 9 comments · Fixed by #5601
Closed

How to prevent deletion of resources for member clusters? #3004

chaunceyjiang opened this issue Dec 29, 2022 · 9 comments · Fixed by #5601
Labels
kind/question Indicates an issue that is a support question.
Milestone

Comments

@chaunceyjiang
Copy link
Member

Please provide an in-depth description of the question you have:

I used the following command by mistake. Now I want to delete coredns on the control plane, but I don’t want to delete the coredns of the member cluster. How should I do it?

karmadactl promote deployment coredns -n kube-system -C cluster1

What do you think about this question?:

Environment:

  • Karmada version: v.1.4.0
  • Kubernetes version:
  • Others:
@chaunceyjiang chaunceyjiang added the kind/question Indicates an issue that is a support question. label Dec 29, 2022
@RainbowMango
Copy link
Member

We have a draft proposal for this:https://github.com/karmada-io/karmada/tree/master/docs/proposals/cleanup-propagated-resources

The proposal is not to solve the mistake but to provide a mechanism to control if the resource should be removed from member clusters.

@chaunceyjiang
Copy link
Member Author

chaunceyjiang commented Dec 30, 2022

provide a mechanism to control if the resource should be removed from member clusters.

This document proposes a mechanism to specify that a member cluster resource should be removed from a managed cluster when leaving.

I don't want to remove the member cluster, I just want to delete the coredns of the control plane.

Because controlling coredns in the control plane is a dangerous operation.

@chaunceyjiang
Copy link
Member Author

// PropagationInstruction is used to mark a resource(like Work) propagation instruction.
// Valid values includes:
// - suppressed: indicates that the resource should not be propagated.
//
// Note: This instruction is intended to set on Work objects to indicate the Work should be ignored by
// execution controller. The instruction maybe deprecated once we extend the Work API and no other scenario want this.
PropagationInstruction = "propagation.karmada.io/instruction"

I think we can extend this instruction.

@RainbowMango RainbowMango added this to the v1.5 milestone Jan 3, 2023
@RainbowMango RainbowMango modified the milestones: v1.5, v1.6 Feb 25, 2023
@RainbowMango RainbowMango modified the milestones: v1.6, v1.7 May 29, 2023
@sunbinnnnn
Copy link

sunbinnnnn commented Jun 28, 2023

I got the same case, and almost cause terrible disaster. my workaround is stopping the controller, and force delete RB, workload and WORK, then start the controller...

@chaunceyjiang
Copy link
Member Author

and almost cause terrible disaster.

Yes

my workaround is stopping the controller, and force delete RB, workload and WORK, then start the controller...

This operation has caused me a lot of trouble.

@RainbowMango
Copy link
Member

I'm trying to figure out which PR/Issue should be included in the coming v1.7 release which is planned at the end of this month.
I guess we don't have enough time for this feature, so I'm moving this to v1.8.

@XiShanYongYe-Chang
Copy link
Member

Hi @chaunceyjiang Do you need to keep work at the same time in your use case?

Ref #4788 (comment)

@RainbowMango
Copy link
Member

This issue could be resolved by #5577 (comment).

/close

@karmada-bot
Copy link
Collaborator

@RainbowMango: Closing this issue.

In response to this:

This issue could be resolved by #5577 (comment).

/close

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-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Indicates an issue that is a support question.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants