pipeline icon indicating copy to clipboard operation
pipeline copied to clipboard

Bump HorizontalPodAutoscaler apiVersion to v2

Open vdemeester opened this issue 3 years ago • 7 comments

Changes

Before this, we get a warning when applying the HPA:

Warning: autoscaling/v2beta1 HorizontalPodAutoscaler is deprecated in v1.22+, unavailable in v1.25+; use autoscaling/v2 HorizontalPodAutoscaler

Signed-off-by: Vincent Demeester [email protected]

Closes #5128 Takes over #4896

/cc @afrittoli @abayer @imjasonh @lbernick @jerop @pritidesai

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • [x] Has Docs included if any changes are user facing
  • [ ] Has Tests included if any functionality added or changed
  • [x] Follows the commit message standard
  • [x] Meets the Tekton contributor standards (including functionality, content, code)
  • [ ] Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
  • [x] Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings)
  • [ ] Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes

Webhook HPA uses autoscaling/v2 instead of the deprecated autoscaling/v2beta1

vdemeester avatar Jul 13 '22 07:07 vdemeester

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afrittoli

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

tekton-robot avatar Jul 13 '22 07:07 tekton-robot

/kind misc

vdemeester avatar Jul 13 '22 07:07 vdemeester

Alright, this fails because apiVersion: autoscaling/v2, kind: HorizontalPodAutoscaler is available starting with 1.23. So v2beta1 is, weirdly enough, deprecated in 1.22+ but the v2 is only available in 1.23.

Bumping to autoscaling/v2 would effectively mean we require a minimum version of kubernetes to be 1.23. We, most likely, will have to do this before or at the same time as kubernetes 1.25 goes out or is "widely" available.

/cc @imjasonh @afrittoli @abayer @tektoncd/core-maintainers

See https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/ and https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/

vdemeester avatar Jul 13 '22 09:07 vdemeester

/hold

vdemeester avatar Jul 13 '22 09:07 vdemeester

/retest

vdemeester avatar Aug 03 '22 15:08 vdemeester

/retest

abayer avatar Aug 23 '22 16:08 abayer

/retest

dibyom avatar Oct 04 '22 16:10 dibyom

Alright, so I was wrong, it's not 1.22 that is required, but 1.23... 😅

vdemeester avatar Oct 05 '22 09:10 vdemeester

In a gist, we need to bump our minimal k8s version to 1.23 to be able to support 1.25 🙃

vdemeester avatar Oct 05 '22 10:10 vdemeester

It does require https://github.com/tektoncd/plumbing/pull/1238 🙃

vdemeester avatar Oct 05 '22 10:10 vdemeester

In a gist, we need to bump our minimal k8s version to 1.23 to be able to support 1.25 🙃

1.22 EOL is coming up on 2022-10-28 so bumping min to 1.23 makes sense 👍

https://kubernetes.io/releases/#release-v1-22

dibyom avatar Oct 05 '22 17:10 dibyom

/retest I think kind should use 1.23 now 🙃

vdemeester avatar Oct 10 '22 15:10 vdemeester

/lgtm

abayer avatar Oct 30 '22 17:10 abayer

/hold cancel

vdemeester avatar Oct 31 '22 08:10 vdemeester