Open
Description
When the sub cluster frequently add and delete workload, karmad-agent will update cluster status frequently, that is inconsistent with the configured via the cluster-status-update-frequency
args.
What happened:
when cluster status be changed frequently, the karamda-controller-manager deal with the condition of cluster object frequently.
What you expected to happen:
the interval of cluster.status updated by karmad-agent should be inconsistent with the cluster-status-update-frequency
(default 10s)
How to reproduce it (as minimally and precisely as possible):
Environment:
- Karmada version: v1.20.10
Metadata
Metadata
Assignees
Type
Projects
Status
No status
Activity
liangyuanpeng commentedon Apr 9, 2025
seems like you put the wrong version here,1.31 is karmada latest version, what's your karmada version.
RainbowMango commentedon Apr 10, 2025
@LivingCcj have you figured out the root cause? It would be great if you could point out the code that doesn't work as expected.
LivingCcj commentedon Apr 10, 2025
At Predicate step, the
UndateFunc
should ignore the requeue if onlycluster.status
changed. Only if cluster_status controller requeue cluster object only by the interval ofcluster-status-update-frequency
In pull mode, the Predicate func for karmada-agent.
karmada/pkg/util/helper/predicate.go
Lines 158 to 174 in 787fd3a
In push mode, the Predicate func for karmada-controller-manager.
karmada/cmd/controller-manager/app/controllermanager.go
Lines 290 to 321 in 787fd3a
--cluster-status-update-frequency
issue #6284RainbowMango commentedon Apr 10, 2025
Are you saying that for both
pull mode
andpush
mode, thecluster-status-controller
updates the Cluster status continuously, regardless of the--cluster-status-update-frequency
flag?If so, it would be a serious mistake that affects the performance heavily.
cc @zach593 @CharlesQQ take a look
LivingCcj commentedon Apr 10, 2025
yeah,just like your saying
LivingCcj commentedon Apr 10, 2025
this pr which could fix the issue
CharlesQQ commentedon Apr 10, 2025
I add and delete workload for many times, but not find the update the Cluster status continuously, which same as
--cluster-status-update-frequency
, @LivingCcj Could you please detailed description on the steps to reproduce your problem?RainbowMango commentedon Apr 10, 2025
@CharlesQQ You've done the test I wanted to do! Thank you very much!
LivingCcj commentedon Apr 10, 2025
Thank you for attentions firstly @RainbowMango @CharlesQQ.
This test scenario needs to add or delete workload frequently in member cluster. like the shell script in member cluster
RainbowMango commentedon Apr 10, 2025
@LivingCcj can you share some logs? Like @CharlesQQ posted above, showing the sync timeline.
LivingCcj commentedon Apr 10, 2025
Load some log from prod member cluster, the period of requeue is less more

CharlesQQ commentedon Apr 11, 2025
@LivingCcj Can you figure out which cluster status fields are changing?
11 remaining items