Skip to content

Commit 3c6b43e

Browse files
committed
scheduler: fix runtime not updated when no pending pods in quota
scheduler: fix runtime not updated when no pending pods in quota Signed-off-by: qinfustu <30459241+qinfustu@users.noreply.github.com> manager: reconcile colocation-profile if enabled (koordinator-sh#2472) Signed-off-by: saintube <saintube@foxmail.com> Co-authored-by: shenxin <rougang.hrg@alibaba-inc.com> proposal: heterogeneous GPU device reporting (koordinator-sh#2423) Signed-off-by: ZhuZhezz <zzhuzju@163.com> scheduler: fine-grained device scheduling support Huawei Ascend NPU (full card) (koordinator-sh#2467) Signed-off-by: Zach Zhu <zzqshu@126.com> koord-descheduler: support node selector for each descheduler profile (koordinator-sh#2168) Signed-off-by: songtao98 <songtao2603060@gmail.com> koord-descheduler: fix descheduler object limiter with multiple profiles (koordinator-sh#2200) Signed-off-by: songtao98 <songtao2603060@gmail.com> scheduler: fix quota webhook panic (koordinator-sh#2473) Signed-off-by: shaloulcy <lcy041536@gmail.com>
1 parent d22578a commit 3c6b43e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

pkg/scheduler/plugins/elasticquota/controller.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,24 @@ func (ctrl *Controller) Name() string {
6262
func (ctrl *Controller) Start() {
6363
go wait.Until(ctrl.syncElasticQuotaStatusWorker, 1*time.Second, context.TODO().Done())
6464
go wait.Until(ctrl.syncElasticQuotaStatusMetricsWorker, 10*time.Second, context.TODO().Done())
65+
if ctrl.plugin.pluginArgs.EnableRuntimeQuota {
66+
go wait.Until(ctrl.syncElasticQuotaRuntimeWorker, 10*time.Second, context.TODO().Done())
67+
}
68+
}
69+
70+
func (ctrl *Controller) syncElasticQuotaRuntimeWorker() {
71+
elasticQuotas, err := ctrl.plugin.quotaLister.List(labels.Everything())
72+
if err != nil {
73+
klog.V(3).ErrorS(err, "Unable to list elastic quota in syncElasticQuotaRuntimeWorker")
74+
return
75+
}
76+
for _, eq := range elasticQuotas {
77+
if !extension.IsParentQuota(eq) {
78+
if gqm := ctrl.plugin.GetGroupQuotaManagerForQuota(eq.Name); gqm != nil {
79+
_ = gqm.RefreshRuntime(eq.Name)
80+
}
81+
}
82+
}
6583
}
6684

6785
func (ctrl *Controller) syncElasticQuotaStatusWorker() {

0 commit comments

Comments
 (0)