Skip to content

Commit 6e28b18

Browse files
authored
Merge pull request #1906 from JoaoBraveCoding/1711
Start using autoscaling/v2 for HorizontalPodAutoscaler
2 parents 898345f + 8f27e70 commit 6e28b18

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

internal/store/builder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
"github.com/prometheus/client_golang/prometheus"
2828
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
2929
appsv1 "k8s.io/api/apps/v1"
30-
autoscaling "k8s.io/api/autoscaling/v2beta2"
30+
autoscaling "k8s.io/api/autoscaling/v2"
3131
batchv1 "k8s.io/api/batch/v1"
3232
certv1 "k8s.io/api/certificates/v1"
3333
coordinationv1 "k8s.io/api/coordination/v1"

internal/store/horizontalpodautoscaler.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package store
1919
import (
2020
"context"
2121

22-
autoscaling "k8s.io/api/autoscaling/v2beta2"
22+
autoscaling "k8s.io/api/autoscaling/v2"
2323
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2424
"k8s.io/apimachinery/pkg/runtime"
2525
"k8s.io/apimachinery/pkg/watch"
@@ -351,11 +351,11 @@ func createHPAListWatch(kubeClient clientset.Interface, ns string, fieldSelector
351351
return &cache.ListWatch{
352352
ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) {
353353
opts.FieldSelector = fieldSelector
354-
return kubeClient.AutoscalingV2beta2().HorizontalPodAutoscalers(ns).List(context.TODO(), opts)
354+
return kubeClient.AutoscalingV2().HorizontalPodAutoscalers(ns).List(context.TODO(), opts)
355355
},
356356
WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) {
357357
opts.FieldSelector = fieldSelector
358-
return kubeClient.AutoscalingV2beta2().HorizontalPodAutoscalers(ns).Watch(context.TODO(), opts)
358+
return kubeClient.AutoscalingV2().HorizontalPodAutoscalers(ns).Watch(context.TODO(), opts)
359359
},
360360
}
361361
}

internal/store/horizontalpodautoscaler_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ package store
1919
import (
2020
"testing"
2121

22-
autoscaling "k8s.io/api/autoscaling/v2beta2"
22+
autoscaling "k8s.io/api/autoscaling/v2"
2323
v1 "k8s.io/api/core/v1"
2424
"k8s.io/apimachinery/pkg/api/resource"
2525
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"

0 commit comments

Comments
 (0)