You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Use the Retain Interpreter to Resolve Control Conflict between the Control Plane and Member Clusters
565
+
566
+
Issue: Retain is a user-customizable interpreter in Karmada that resolves control conflicts when both the Karmada control plane
567
+
and member clusters have control over member cluster resources.
568
+
A typical scenario is when the replicas of a member cluster's Deployment is controlled by both the control plane's resource template and the member cluster's HPA.
569
+
This leads to an abnormal state of the member cluster's Deployment due to repeated modifications of the replicas by both entities.
570
+
571
+
Solution:
572
+
* Implement the corresponding Retain Interpreter for your workload type resources to decide when to respond to modifications from the control plane's resource template
573
+
and when to respond to modifications from the member cluster's HPA.
574
+
Currently, Karmada has only implemented the Retain interpreter for Deployment resources. The specific implementation is as follows:
575
+
if the resource template has the label resource template.karmada.io/retain-replicas, it will be controlled by the member cluster's HPA;
576
+
otherwise, it will be controlled by the control plane's resource template (if the hpaReplicasSyncer controller is explicitly enabled,
577
+
Karmada can automatically label the Deployment enabled with HPA with this label). If you need to resolve this conflict for other resources or custom CRD resources,
578
+
you can refer to the Retain solution for Deployments.
579
+
* If you want a more elegant and comprehensive solution to the above problem, we recommend replacing HPA with [FederatedHPA](../../userguide/autoscaling/federatedhpa.md).
0 commit comments