karmada-io / karmada

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

Support modification synchronization of custom resources as dependency #3605

Closed whitewindmills closed 10 months ago

whitewindmills commented 11 months ago

What would you like to be added: Current InterpretDependency supports custom implementations to interpret the dependencies be propagated together. But, when the custom resource is modified, only built-in resources, like configmaps, secrets, serviceaccounts and persistentvolumeclaims , can be automatically propagated.

karmada's image

member's image

Why is this needed: Any resources propagated through Karmada should support be automatically propagated when some fields changed.

yike21 commented 11 months ago

I'm a little confused that .spec.lspPktMark exists in the resource in karmada but not exists in the resource propagated in the member cluser. Even if this is a CR, I think the .spec of the resource should be consistent with that in member except its ResourceInterpreterCustomization implements the retain operation. I'm just curious about this, please continue your work, thanks.

whitewindmills commented 11 months ago

@yike21 Hi I guess you did not get me. This custom resource was propagated as dependency rather than individually.

whitewindmills commented 11 months ago

/assign @chaunceyjiang

RainbowMango commented 10 months ago

@yike21 I think the root cause is that dependencies-distributor now only watches a limited supported types(including configmaps/secrets/serviceaccounts/persistentvolumeclaims), these resource changes will be synced automatically, but for other resources like customized by resource interpreter(https://github.com/karmada-io/karmada/blob/9bac51dbdf29ac0c564d47a96f4eeb13fe85e91f/pkg/dependenciesdistributor/dependencies_distributor.go#L339), the changes will not be synced (I can't see the Kind from the issue description, but I guess it should be a CRD, or at least not on the supported list).

@whitewindmills @chaunceyjiang Please correct me if not the case.

chaunceyjiang commented 10 months ago

, but for other resources like customized by resource interpreter , the changes will not be synced .

Yes, This PR can help you better understand. When I added SA before, I forgot to add it to the support list of dependencies-distributor. the SA changes will not be synced to member clusters.

yike21 commented 10 months ago

Thank you for clearing up the confusion. @whitewindmills @RainbowMango @chaunceyjiang