@@ -20,8 +20,6 @@ import (
20
20
"sync"
21
21
"time"
22
22
23
- "github.com/prometheus/client_golang/prometheus"
24
-
25
23
"k8s.io/component-base/metrics"
26
24
"k8s.io/component-base/metrics/legacyregistry"
27
25
volumeschedulingmetrics "k8s.io/kubernetes/pkg/controller/volume/scheduling/metrics"
@@ -60,11 +58,11 @@ var (
60
58
StabilityLevel : metrics .ALPHA ,
61
59
}, []string {"result" })
62
60
// PodScheduleSuccesses counts how many pods were scheduled.
63
- PodScheduleSuccesses = scheduleAttempts .With (prometheus .Labels {"result" : "scheduled" })
61
+ PodScheduleSuccesses = scheduleAttempts .With (metrics .Labels {"result" : "scheduled" })
64
62
// PodScheduleFailures counts how many pods could not be scheduled.
65
- PodScheduleFailures = scheduleAttempts .With (prometheus .Labels {"result" : "unschedulable" })
63
+ PodScheduleFailures = scheduleAttempts .With (metrics .Labels {"result" : "unschedulable" })
66
64
// PodScheduleErrors counts how many pods could not be scheduled due to a scheduler error.
67
- PodScheduleErrors = scheduleAttempts .With (prometheus .Labels {"result" : "error" })
65
+ PodScheduleErrors = scheduleAttempts .With (metrics .Labels {"result" : "error" })
68
66
SchedulingLatency = metrics .NewSummaryVec (
69
67
& metrics.SummaryOpts {
70
68
Subsystem : SchedulerSubsystem ,
@@ -257,17 +255,17 @@ func Register() {
257
255
258
256
// ActivePods returns the pending pods metrics with the label active
259
257
func ActivePods () metrics.GaugeMetric {
260
- return pendingPods .With (prometheus .Labels {"queue" : "active" })
258
+ return pendingPods .With (metrics .Labels {"queue" : "active" })
261
259
}
262
260
263
261
// BackoffPods returns the pending pods metrics with the label backoff
264
262
func BackoffPods () metrics.GaugeMetric {
265
- return pendingPods .With (prometheus .Labels {"queue" : "backoff" })
263
+ return pendingPods .With (metrics .Labels {"queue" : "backoff" })
266
264
}
267
265
268
266
// UnschedulablePods returns the pending pods metrics with the label unschedulable
269
267
func UnschedulablePods () metrics.GaugeMetric {
270
- return pendingPods .With (prometheus .Labels {"queue" : "unschedulable" })
268
+ return pendingPods .With (metrics .Labels {"queue" : "unschedulable" })
271
269
}
272
270
273
271
// Reset resets metrics
0 commit comments