Skip to content

Commit a4bddfd

Browse files
committed
remove unschedulable_pods_count metric in disruption loop
Signed-off-by: shenxianjie <[email protected]>
1 parent e24a934 commit a4bddfd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/controllers/provisioning/scheduling/scheduler.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,9 @@ func (s *Scheduler) Solve(ctx context.Context, pods []*corev1.Pod) Results {
275275
// We need to schedule them alternating, A, B, A, B, .... and this solution also solves that as well.
276276
errors := map[*corev1.Pod]error{}
277277
// Reset the metric for the controller, so we don't keep old ids around
278-
UnschedulablePodsCount.DeletePartialMatch(map[string]string{ControllerLabel: injection.GetControllerName(ctx)})
278+
if injection.GetControllerName(ctx) == "provisioner" {
279+
UnschedulablePodsCount.DeletePartialMatch(map[string]string{ControllerLabel: injection.GetControllerName(ctx)})
280+
}
279281
QueueDepth.DeletePartialMatch(map[string]string{ControllerLabel: injection.GetControllerName(ctx)})
280282
for _, p := range pods {
281283
s.updateCachedPodData(p)

0 commit comments

Comments
 (0)