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

Propose donot delete namespace when karmadactl deinit #3344

Closed
hzxuzhonghu opened this issue Mar 30, 2023 · 7 comments
Closed

Propose donot delete namespace when karmadactl deinit #3344

hzxuzhonghu opened this issue Mar 30, 2023 · 7 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@hzxuzhonghu
Copy link
Member

What would you like to be added:

I installed karmada in a private namespace which has many other resource objects that donot belong to karmada.

However when i uinstall with kubectl-karmda deinit -n , my namespace is also deleted, which is not expected.

Looking into istio, it also use istioctl uninstall, but after it uninstall, the namespace is still there. Deleting a namespace can be terrible, i think this option should be given back to user.

@hzxuzhonghu hzxuzhonghu added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 30, 2023
@XiShanYongYe-Chang
Copy link
Member

It makes sense, maybe we can consider adding an option to control.
Ask the module owner to help take a look.

/cc @lonelyCZ @carlory

@lonelyCZ
Copy link
Member

It makes sense, we only set a option here. I will add it.

// Delete namespace where Karmada components are installed
fmt.Printf("delete Namespace %q\n", o.Namespace)
if o.DryRun {
return nil
}
if err = o.KubeClientSet.CoreV1().Namespaces().Delete(context.Background(), o.Namespace, metav1.DeleteOptions{}); err != nil {
return err
}

/assign

@RainbowMango
Copy link
Member

@lonelyCZ Please take a look at #3326, seems the same issue.

@lonelyCZ
Copy link
Member

@lonelyCZ Please take a look at #3326, seems the same issue.

Oh, I missed it. Let't continue to #3326 .

@RainbowMango
Copy link
Member

In my opinion, if we can recognize that the namespace was created by Karmada, then we have the confidence to remove it during deinit by default, (relying #2862).
But also glad to have the option/flag to reserve the namespace from deleting.

@lonelyCZ
Copy link
Member

This has be resolved by #3326

/close

@karmada-bot
Copy link
Collaborator

@lonelyCZ: Closing this issue.

In response to this:

This has be resolved by #3326

/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/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

5 participants