Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PAASTA-18383: Update V2Beta2 HPA api references to V2 for 1.26 #4007

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

jfongatyelp
Copy link
Contributor

As per https://kubernetes.io/docs/reference/using-api/deprecation-guide/#horizontalpodautoscaler-v126 the V2beta2 version of the HorizontalPodAutoscaler api is being deprecated in 1.26.

This updates as per recommendations to v2, and as all of our clusters are >1.23 they should support it.
Note that we did not use targetAverageUtilization that has been switched to target.type=Utilization+target.averageUtilization, as we'd already used the latter in our code.

This has been tested in paasta playground and infrastage and s_k_j was able to create/modify the appropriate HPA objects and autoscaling was successful.

Confirmed with audit logs that paasta was sending the request to autoscaling/v2 rather than autoscaling/v2beta2 with the change.

@@ -237,19 +237,19 @@
# For detail, https://github.com/kubernetes-client/python/issues/553
# This hack should be removed when the issue got fixed.
# This is no better way to work around rn.
class MonkeyPatchAutoScalingConditions(V2beta2HorizontalPodAutoscalerStatus):
class MonkeyPatchAutoScalingConditions(V2HorizontalPodAutoscalerStatus):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i kinda wonder if we still need this - the linked GH issue fizzled out a while back,
but hopefully it's actually been fixed since we added this!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, I will take a look at this and remove if we can!

@jfongatyelp jfongatyelp merged commit 99d736c into master Jan 28, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants