Skip to content

Commit

Permalink
chore: Update the scheduling metric name to be `karpenter_pods_provis…
Browse files Browse the repository at this point in the history
…ioning_scheduling_undecided_time_seconds` (#2024)
  • Loading branch information
engedaam authored Feb 21, 2025
1 parent b878104 commit 1c6342c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/controllers/metrics/pod/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ var (
prometheus.GaugeOpts{
Namespace: metrics.Namespace,
Subsystem: metrics.PodSubsystem,
Name: "scheduling_undecided_time_seconds",
Name: "provisioning_scheduling_undecided_time_seconds",
Help: "The time from when Karpenter has seen a pod without making a scheduling decision for the pod. Note: this calculated from a point in memory, not by the pod creation timestamp.",
},
[]string{podName, podNamespace},
Expand Down
12 changes: 6 additions & 6 deletions pkg/controllers/metrics/pod/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ var _ = Describe("Pod Metrics", func() {

ExpectReconcileSucceeded(ctx, podController, client.ObjectKeyFromObject(p))
fakeClock.Step(1 * time.Hour)
_, found := FindMetricWithLabelValues("karpenter_pods_scheduling_undecided_time_seconds", map[string]string{
_, found := FindMetricWithLabelValues("karpenter_pods_provisioning_scheduling_undecided_time_seconds", map[string]string{
"name": p.GetName(),
"namespace": p.GetNamespace(),
})
Expand All @@ -265,7 +265,7 @@ var _ = Describe("Pod Metrics", func() {
ExpectReconcileSucceeded(ctx, podController, client.ObjectKeyFromObject(p))
fakeClock.Step(1 * time.Hour)

_, found = FindMetricWithLabelValues("karpenter_pods_scheduling_undecided_time_seconds", map[string]string{
_, found = FindMetricWithLabelValues("karpenter_pods_provisioning_scheduling_undecided_time_seconds", map[string]string{
"name": p.GetName(),
"namespace": p.GetNamespace(),
})
Expand All @@ -274,7 +274,7 @@ var _ = Describe("Pod Metrics", func() {
cluster.MarkPodSchedulingDecisions(map[*corev1.Pod]error{}, p)
ExpectReconcileSucceeded(ctx, podController, client.ObjectKeyFromObject(p))

_, found = FindMetricWithLabelValues("karpenter_pods_scheduling_undecided_time_seconds", map[string]string{
_, found = FindMetricWithLabelValues("karpenter_pods_provisioning_scheduling_undecided_time_seconds", map[string]string{
"name": p.GetName(),
"namespace": p.GetNamespace(),
})
Expand All @@ -287,7 +287,7 @@ var _ = Describe("Pod Metrics", func() {

ExpectReconcileSucceeded(ctx, podController, client.ObjectKeyFromObject(p))
fakeClock.Step(1 * time.Hour)
_, found := FindMetricWithLabelValues("karpenter_pods_scheduling_undecided_time_seconds", map[string]string{
_, found := FindMetricWithLabelValues("karpenter_pods_provisioning_scheduling_undecided_time_seconds", map[string]string{
"name": p.GetName(),
"namespace": p.GetNamespace(),
})
Expand All @@ -298,7 +298,7 @@ var _ = Describe("Pod Metrics", func() {
ExpectReconcileSucceeded(ctx, podController, client.ObjectKeyFromObject(p))
fakeClock.Step(1 * time.Hour)

_, found = FindMetricWithLabelValues("karpenter_pods_scheduling_undecided_time_seconds", map[string]string{
_, found = FindMetricWithLabelValues("karpenter_pods_provisioning_scheduling_undecided_time_seconds", map[string]string{
"name": p.GetName(),
"namespace": p.GetNamespace(),
})
Expand All @@ -307,7 +307,7 @@ var _ = Describe("Pod Metrics", func() {
ExpectDeleted(ctx, env.Client, p)
ExpectReconcileSucceeded(ctx, podController, client.ObjectKeyFromObject(p))

_, found = FindMetricWithLabelValues("karpenter_pods_scheduling_undecided_time_seconds", map[string]string{
_, found = FindMetricWithLabelValues("karpenter_pods_provisioning_scheduling_undecided_time_seconds", map[string]string{
"name": p.GetName(),
"namespace": p.GetNamespace(),
})
Expand Down

0 comments on commit 1c6342c

Please sign in to comment.