Update the Kubernetes autoscaling API to v2 (#2722) (#2842)

* Update the Kubernetes autoscaling API to v2 (#2722)
  - k8s.io/api/autoscaling/v2
* generate all files
* fix missing v2beta ref

---------

Signed-off-by: Lunik <lunik@tiwabbit.fr>
This commit is contained in:
Guillaume MARTINEZ
2023-10-11 11:04:45 +05:30
committed by GitHub
parent b43b31884a
commit 3762ff80f2
10 changed files with 52 additions and 51 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/trace"
appsv1 "k8s.io/api/apps/v1"
asv2beta2 "k8s.io/api/autoscaling/v2beta2"
asv2 "k8s.io/api/autoscaling/v2"
apiv1 "k8s.io/api/core/v1"
@@ -77,7 +77,7 @@ func GetAttributesForDeployment(deployment *appsv1.Deployment) []attribute.KeyVa
}
}
func GetAttributesForHPA(hpa *asv2beta2.HorizontalPodAutoscaler) []attribute.KeyValue {
func GetAttributesForHPA(hpa *asv2.HorizontalPodAutoscaler) []attribute.KeyValue {
if hpa == nil {
return []attribute.KeyValue{}
}