karmada icon indicating copy to clipboard operation
karmada copied to clipboard

Introduce a Lazy Activation feature to Policy

Open chaosi-zju opened this issue 1 year ago • 2 comments

What would you like to be added:

Introduced a ActivationPreference filed to Policy, indicating how the referencing resource template will be propagated, in case of policy changes.

If empty, the resource template will respond to policy changes immediately, in other words, any policy changes will drive the resource template to be propagated immediately as per the current propagation rules.

If the value is Lazy means the policy changes will not take effect for now but defer to the resource template changes, in other words, the resource template will not be propagated as per the current propagation rules until there is an update on it.

Why is this needed:

In the scenario where Policy responsibilities are separated from Resource responsibilities, one role is dedicated to Policy management, which is referred to as cluster administrator, and the other role is dedicated to Resource management, which is referred to as user. The cluster administrator would preconfigure some Policies for users, then the users apply their own Resources and propagated them according to the preconfigured Policy.

However, the administrator has requests to modify the Policy in the future, such as migrating propagation clusters. As the current Policy modification is effective immediately, the modification will affect the propagation status of a large number of resource templates and have a great impact on the system.

The administrator is worried that the modification will lead to the failure of the business application in the non-change window, so the administrator hopes that the modification of Policy can be delayed until the business application change window takes effect.

Notes

This feature has some system constraints and risks, which will be described in detail proposal document.


Related Actions

  1. Proposal
    • [x] #4602
  2. Implemention
    • [x] #4577
  3. Test
    • [ ] #4607

chaosi-zju avatar Jan 19 '24 08:01 chaosi-zju

CC @RainbowMango

#4564 and #4570 are all PRs about code modification, and ready to review, thanks.

chaosi-zju avatar Jan 21 '24 08:01 chaosi-zju

Can this issue be closed first? The E2E task can be tracked by #4607. @chaosi-zju

XiShanYongYe-Chang avatar Apr 18 '24 09:04 XiShanYongYe-Chang