From b8532b756b45e42a19e0659a026dee76a8ffc95f Mon Sep 17 00:00:00 2001 From: Lucas Thiesen Date: Fri, 5 May 2023 12:05:09 +0200 Subject: [PATCH] Update HPA to autoscaling/v2 in new collectors Reference links: https://github.com/zalando-incubator/kube-metrics-adapter/pull/551 Signed-off-by: Lucas Thiesen --- pkg/collector/fake_collector_test.go | 3 ++- pkg/collector/hostname_collector.go | 3 ++- pkg/collector/hostname_collector_test.go | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg/collector/fake_collector_test.go b/pkg/collector/fake_collector_test.go index 1077c6c..4d6d91f 100644 --- a/pkg/collector/fake_collector_test.go +++ b/pkg/collector/fake_collector_test.go @@ -3,7 +3,8 @@ package collector import ( "time" - autoscalingv2 "k8s.io/api/autoscaling/v2beta2" + //autoscalingv2 "k8s.io/api/autoscaling/v2beta2" + autoscalingv2 "k8s.io/api/autoscaling/v2" "k8s.io/apimachinery/pkg/api/resource" "k8s.io/metrics/pkg/apis/custom_metrics" ) diff --git a/pkg/collector/hostname_collector.go b/pkg/collector/hostname_collector.go index 86a62ec..a1aa762 100644 --- a/pkg/collector/hostname_collector.go +++ b/pkg/collector/hostname_collector.go @@ -7,7 +7,8 @@ import ( "strings" "time" - autoscalingv2 "k8s.io/api/autoscaling/v2beta2" + //autoscalingv2 "k8s.io/api/autoscaling/v2beta2" + autoscalingv2 "k8s.io/api/autoscaling/v2" ) const ( diff --git a/pkg/collector/hostname_collector_test.go b/pkg/collector/hostname_collector_test.go index 06e7614..6aa6216 100644 --- a/pkg/collector/hostname_collector_test.go +++ b/pkg/collector/hostname_collector_test.go @@ -6,7 +6,8 @@ import ( "time" "github.com/stretchr/testify/require" - autoscalingv2 "k8s.io/api/autoscaling/v2beta2" + //autoscalingv2 "k8s.io/api/autoscaling/v2beta2" + autoscalingv2 "k8s.io/api/autoscaling/v2" "k8s.io/apimachinery/pkg/api/resource" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/metrics/pkg/apis/external_metrics"