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

希望增加可配置的级联删除策略 #5405

Open
sange95 opened this issue Aug 20, 2024 · 5 comments
Open

希望增加可配置的级联删除策略 #5405

sange95 opened this issue Aug 20, 2024 · 5 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@sange95
Copy link

sange95 commented Aug 20, 2024

What would you like to be added:
使用karmada删除资源的过程中希望可以提供配置级联删除的策略,"background", "orphan", or "foreground"

Why is this needed:
项目开发中需要foreground的级联删除策略

@sange95 sange95 added the kind/feature Categorizes issue or PR as related to a new feature. label Aug 20, 2024
@XiShanYongYe-Chang
Copy link
Member

可以关注下 #5101 这个提案,另外,可以稍微说明下使用的场景么?

@sange95
Copy link
Author

sange95 commented Aug 20, 2024

场景比较少见吧,简单说一下,当开发 crd 的 controller 过程中要等子 cr 资源(设置了 owner reference 的资源)全都释放完之后再去释放非 cr 的一些资源(业务需求:比如等 pod 或者 sts 删除后去回收 api 类的资源),那么当释放这类资源的时候必然要通过主 cr 资源spec或者 status 中的数据来去释放(比如某某资源的 id),如果使用默认的后台删除,协调函数就捕获不到了子 cr 资源释放完的通知了,导致有些非 cr 类资源残留,所以前台的级联删除更方便,可是通过karmada源码来看删除所有的资源好像都是默认后台删除并且没有提供设置的方式,当然也可以自己维护删除这些子 cr 资源,但是没有设置owner reference 来的方便,大概就是这个情况吧,感谢回复

@XiShanYongYe-Chang
Copy link
Member

感谢回复。有点抱歉,我还没能完全理解你举的例子(如果你能在下次社区会议上分享下你的需求就更好了)。

我现在理解下来,这个需求与 #5101 应该是一个并行的需求,它们有共性 -- 都关注资源删除,但并不是隶属关系。

多问个问题,你希望级联删除策略的指定是全局性的,还是资源粒度的?

@sange95
Copy link
Author

sange95 commented Aug 21, 2024

需求就是想等子资源删除完之后再去做一些操作,其实就是前台级联删除的场景;另外关于级联删除的颗粒度的问题,全局性的意思是整个karmada设置一个关于级联删除策略的配置吗?然后所有的资源都是根据这个和配置执行删除的策略,如果别人想用别的级联删除策略那么需要重启karmada服务,或者进行热更新配置?如果是这样的话我更倾向于资源粒度的情况,因为这样更加灵活一点,比如我们公司来说多个产品都在用karmada,那么有些产品的资源想要前台删除有些是后台删除

@XiShanYongYe-Chang
Copy link
Member

了解,多谢~。你愿意提交一个提案来推动这个特性么?

顺便问下,你们公司或者团队已经在使用Karmada了么?

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
Status: No status
Development

No branches or pull requests

2 participants