Bug 2069543

Summary: autoscaling/v2beta2 HorizontalPodAutoscaler is deprecated in v1.23+, unavailable in v1.26+; use autoscaling/v2 HorizontalPodAutoscaler
Product: OpenShift Container Platform Reporter: Junqi Zhao <juzhao>
Component: MonitoringAssignee: Arunprasad Rajkumar <arajkuma>
Status: CLOSED UPSTREAM QA Contact: Junqi Zhao <juzhao>
Severity: low Docs Contact:
Priority: low    
Version: 4.11CC: amuller, anpicker, aos-bugs, arajkuma, erooth, spasquie
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-30 11:36:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Junqi Zhao 2022-03-29 06:37:27 UTC
Description of problem:
# oc -n openshift-monitoring logs -c kube-state-metrics kube-state-metrics-bccfd6c46-dstjf 
...
W0328 23:29:36.507930       1 warnings.go:70] autoscaling/v2beta2 HorizontalPodAutoscaler is deprecated in v1.23+, unavailable in v1.26+; use autoscaling/v2 HorizontalPodAutoscaler
W0328 23:29:36.538124       1 warnings.go:70] autoscaling/v2beta2 HorizontalPodAutoscaler is deprecated in v1.23+, unavailable in v1.26+; use autoscaling/v2 HorizontalPodAutoscaler
...

# oc -n openshift-monitoring logs -c kube-state-metrics kube-state-metrics-bccfd6c46-dstjf | grep "autoscaling/v2beta2 HorizontalPodAutoscaler is deprecated in v1.23+, unavailable in v1.26+; use autoscaling/v2 HorizontalPodAutoscaler" | wc -l
58

# oc explain HorizontalPodAutoscaler
KIND:     HorizontalPodAutoscaler
VERSION:  autoscaling/v2



Version-Release number of selected component (if applicable):
kubernetes: v1.23.3+54654d2
4.11.0-0.nightly-2022-03-27-140854

How reproducible:
always

Steps to Reproduce:
1.
2.
3.

Actual results:
warning "autoscaling/v2beta2 HorizontalPodAutoscaler is deprecated in v1.23+, unavailable in v1.26+; use autoscaling/v2 HorizontalPodAutoscaler"

Expected results:
no warning

Additional info:

Comment 1 Arunprasad Rajkumar 2022-03-30 10:56:54 UTC
Current KSM master supports up to k8s v1.21 and v1.21 doesn't have autoscaling/v2 HorizontalPodAutoscaler. Lets wait until v1.25 so that the KSM's least support k8s version would become v1.23.

Comment 2 Simon Pasquier 2022-03-30 11:21:17 UTC
@Arun do we have an upstream issue tracking this? 
Once it exists, I'd be even inclined to close the bugzilla with UPSTREAM resolution.

Comment 3 Arunprasad Rajkumar 2022-03-30 11:36:03 UTC
Thanks @spasquie, created an upstream issue[1] and closing this.

[1] https://github.com/kubernetes/kube-state-metrics/issues/1711