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

Update HorizontalPodAutoscaler code from v1 #943

Closed
kevinearls opened this issue Jun 23, 2022 · 3 comments · Fixed by #1014
Closed

Update HorizontalPodAutoscaler code from v1 #943

kevinearls opened this issue Jun 23, 2022 · 3 comments · Fixed by #1014
Labels
area:collector Issues for deploying collector

Comments

@kevinearls
Copy link
Member

The current HPA code uses version v1 of the API. We should upgrade to v2 or v2beta2 depending on what is supported in the versions of kubernetes that we need to support.

@pavolloffay
Copy link
Member

pavolloffay commented Jun 24, 2022

What is the reasoning/use-case to migrate to v2beta2 or v2 on our end? Are we using any of the v2 features?

from: https://kubernetes.io/docs/reference/using-api/deprecation-guide/

Migrate manifests and API clients to use the autoscaling/v2 API version, available since v1.23.

We cannot use v2 right now because we are supporting k8s 1.19.

The autoscaling/v2beta1 API version of HorizontalPodAutoscaler will no longer be served in v1.25.

v2beta2 could be intentionally used https://stackoverflow.com/a/62455298 (added in k8s 1.12).

@kevinearls
Copy link
Member Author

The reason is to be able to add more features which will, among other things, permit us to change the scaledown time in order to run an e2e test (See #942) which does not run for an inordinate amount of time.

v1 is fairly old. I was not able to find a release date, but I found references to v2beta2 from 2019. Jaeger Operator uses it, and the code that added that was written in January 2020. (See jaegertracing/jaeger-operator#856)

@pavolloffay
Copy link
Member

v2beta2 was added in k8s 1.12 based on the link I shared above.

The autoscaling/v2beta2 API version of HorizontalPodAutoscaler will no longer be served in v1.26.

from https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-26

We should migrate to v2 however the v2 is supported on k8s 1.23 and above and we must support k8s 1.19 for now (RH requirement). Therefore I would suggest to choose the right autoscaler version at runtime:

  • v2beta2 in 1.19-1.22
  • v2 1.23 and above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:collector Issues for deploying collector
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants