Merge pull request #1921 from ceriath/main

hpa: remove v2beta2 support
This commit is contained in:
Sanskar Jaiswal
2026-05-23 17:22:04 +05:30
committed by GitHub
11 changed files with 19 additions and 289 deletions
+3 -3
View File
@@ -17,7 +17,7 @@ limitations under the License.
package v1alpha1
import (
autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2"
autoscalingv2 "k8s.io/api/autoscaling/v2"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
@@ -106,7 +106,7 @@ type HorizontalPodAutoscalerConfig struct {
// +optional
Name string `json:"name,omitempty"`
// +optional
Behavior *autoscalingv2beta2.HorizontalPodAutoscalerBehavior `json:"behavior,omitempty"`
Behavior *autoscalingv2.HorizontalPodAutoscalerBehavior `json:"behavior,omitempty"`
}
// ScaleTarget holds the a reference to the scale target Object
@@ -129,7 +129,7 @@ type ScaleTriggers struct {
// +optional
AuthenticationRef *ScaledObjectAuthRef `json:"authenticationRef,omitempty"`
// +optional
MetricType autoscalingv2beta2.MetricTargetType `json:"metricType,omitempty"`
MetricType autoscalingv2.MetricTargetType `json:"metricType,omitempty"`
}
// +k8s:openapi-gen=true
@@ -22,7 +22,7 @@ limitations under the License.
package v1alpha1
import (
v2beta2 "k8s.io/api/autoscaling/v2beta2"
v2 "k8s.io/api/autoscaling/v2"
runtime "k8s.io/apimachinery/pkg/runtime"
)
@@ -141,7 +141,7 @@ func (in *HorizontalPodAutoscalerConfig) DeepCopyInto(out *HorizontalPodAutoscal
*out = *in
if in.Behavior != nil {
in, out := &in.Behavior, &out.Behavior
*out = new(v2beta2.HorizontalPodAutoscalerBehavior)
*out = new(v2.HorizontalPodAutoscalerBehavior)
(*in).DeepCopyInto(*out)
}
return