Skip to content

Commit

Permalink
Merge pull request #1906 from JoaoBraveCoding/1711
Browse files Browse the repository at this point in the history
Start using autoscaling/v2 for HorizontalPodAutoscaler
  • Loading branch information
k8s-ci-robot committed Nov 24, 2022
2 parents 898345f + 8f27e70 commit 6e28b18
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion internal/store/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
admissionregistrationv1 "k8s.io/api/admissionregistration/v1"
appsv1 "k8s.io/api/apps/v1"
autoscaling "k8s.io/api/autoscaling/v2beta2"
autoscaling "k8s.io/api/autoscaling/v2"
batchv1 "k8s.io/api/batch/v1"
certv1 "k8s.io/api/certificates/v1"
coordinationv1 "k8s.io/api/coordination/v1"
Expand Down
6 changes: 3 additions & 3 deletions internal/store/horizontalpodautoscaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package store
import (
"context"

autoscaling "k8s.io/api/autoscaling/v2beta2"
autoscaling "k8s.io/api/autoscaling/v2"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/watch"
Expand Down Expand Up @@ -351,11 +351,11 @@ func createHPAListWatch(kubeClient clientset.Interface, ns string, fieldSelector
return &cache.ListWatch{
ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) {
opts.FieldSelector = fieldSelector
return kubeClient.AutoscalingV2beta2().HorizontalPodAutoscalers(ns).List(context.TODO(), opts)
return kubeClient.AutoscalingV2().HorizontalPodAutoscalers(ns).List(context.TODO(), opts)
},
WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) {
opts.FieldSelector = fieldSelector
return kubeClient.AutoscalingV2beta2().HorizontalPodAutoscalers(ns).Watch(context.TODO(), opts)
return kubeClient.AutoscalingV2().HorizontalPodAutoscalers(ns).Watch(context.TODO(), opts)
},
}
}
2 changes: 1 addition & 1 deletion internal/store/horizontalpodautoscaler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package store
import (
"testing"

autoscaling "k8s.io/api/autoscaling/v2beta2"
autoscaling "k8s.io/api/autoscaling/v2"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down

0 comments on commit 6e28b18

Please sign in to comment.