Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove unschedulable_pods_count metric in disruption loop #2049

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pkg/controllers/provisioning/scheduling/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@ func (s *Scheduler) Solve(ctx context.Context, pods []*corev1.Pod) Results {
// We need to schedule them alternating, A, B, A, B, .... and this solution also solves that as well.
errors := map[*corev1.Pod]error{}
// Reset the metric for the controller, so we don't keep old ids around
UnschedulablePodsCount.DeletePartialMatch(map[string]string{ControllerLabel: injection.GetControllerName(ctx)})
if injection.GetControllerName(ctx) == "provisioner" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just drop deleting this altogether? It's not clear to me why we just don't rely on the next round of scheduling to handle it -- the one thing that we do need to handle is setting the value to 0 when we don't find any pending pods/when we aren't getting a trigger to run scheduling.

UnschedulablePodsCount.DeletePartialMatch(map[string]string{ControllerLabel: injection.GetControllerName(ctx)})
}
QueueDepth.DeletePartialMatch(map[string]string{ControllerLabel: injection.GetControllerName(ctx)})
for _, p := range pods {
s.updateCachedPodData(p)
Expand Down
Loading