karmada-io / karmada

Open, Multi-Cloud, Multi-Cluster Kubernetes Orchestration
https://karmada.io
Apache License 2.0
4.12k stars 807 forks source link

Is there a way to retain ConfigMap in member cluster? #4842

Closed tpiperatgod closed 1 week ago

tpiperatgod commented 2 weeks ago

Please provide an in-depth description of the question you have: After propagation through Karmada, member clusters are unable to modify configmap resources to the point where certain cluster-based configurations cannot be applied.

What do you think about this question?: I want to be able to modify a configmap resource in the member cluster propagated by karmada, is there any way to do that? Environment:

XiShanYongYe-Chang commented 2 weeks ago

Hi @tpiperatgod, I recommend you use the resource interpreter for your purposes, you can use retain operation to retain the fields of cm in the member cluster.

tpiperatgod commented 2 weeks ago

Thanks, can you give me an example of how to use the retain operation to retain the cm resource? I've read this section before and realized that cm is not in the default support list.

XiShanYongYe-Chang commented 2 weeks ago

You can customize it with a webhook or a lua script. You can choose one.

tpiperatgod commented 2 weeks ago

You can customize it with a webhook or a lua script. You can choose one.

Yes, this is one way I know ...... But I think it's too heavy, is it possible to take the resource out of the propagation management by adding an annotation or something like that?

tpiperatgod commented 2 weeks ago

Add: I don't want to retain all configmap resources, but some specific configmap resources.

XiShanYongYe-Chang commented 1 week ago

But I think it's too heavy, is it possible to take the resource out of the propagation management by adding an annotation or something like that?

Annotation seems convenient, but it is not easy to iterate.

Add: I don't want to retain all configmap resources, but some specific configmap resources.

The current support granularity is really not that small. I think it makes sense to support this.

tpiperatgod commented 1 week ago

Anyway, I implemented it the webhook way, thanks!

XiShanYongYe-Chang commented 1 week ago

Add: I don't want to retain all configmap resources, but some specific configmap resources.

If necessary, you can raise an issue to track the task. If convenient, you can provide your user story to promote the task.