Skip to content

Commit 005dc7d

Browse files
committed
fix a code hygiene
Signed-off-by: whosefriendA <[email protected]>
1 parent 88b1ce0 commit 005dc7d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/controllers/cluster/dynamic_rate_limiter.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"time"
2121

2222
"k8s.io/apimachinery/pkg/labels"
23+
"k8s.io/apimachinery/pkg/runtime/schema"
2324
"k8s.io/client-go/util/workqueue"
2425
"k8s.io/klog/v2"
2526

@@ -69,7 +70,11 @@ func (d *DynamicRateLimiter[T]) When(_ T) time.Duration {
6970
// - Secondary rate when system is unhealthy but large-scale
7071
// - Zero (halt evictions) when system is unhealthy and small-scale
7172
func (d *DynamicRateLimiter[T]) getCurrentRate() float32 {
72-
clusterGVR := clusterv1alpha1.SchemeGroupVersion.WithResource("clusters")
73+
clusterGVR := schema.GroupVersionResource{
74+
Group: clusterv1alpha1.GroupName,
75+
Version: "v1alpha1",
76+
Resource: "clusters",
77+
}
7378

7479
var lister = d.informerManager.Lister(clusterGVR)
7580
if lister == nil {

0 commit comments

Comments
 (0)