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

VPA: Remove v1beta2 #7629

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

adrianmoisey
Copy link
Member

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Remove v1beta2 API

Which issue(s) this PR fixes:

Fixes #5922

Special notes for your reviewer:

I'm unsure if there is anything else that needs to happen to remove this API

Does this PR introduce a user-facing change?

Remove deprecated v1beta2 APIs

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. area/vertical-pod-autoscaler labels Dec 19, 2024
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 19, 2024
@k8s-ci-robot k8s-ci-robot requested a review from voelzmo December 19, 2024 05:24
@k8s-ci-robot k8s-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Dec 19, 2024
Copy link
Contributor

@voelzmo voelzmo left a comment

Choose a reason for hiding this comment

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

Hey @adrianmoisey thanks for doing this PR! I love changes which consist basically only of removing lines!

I have two asks before this is ready to be merged from my point of view:

  • I think we should add a comment to the README similar to what we did for the migration from v1beta1 to v1beta2. Contrary to the previous api migration, there aren't any changes necessary for users (v1 didn't make any incompatible changes), except for changing v1beta2 to v1 in their VPA objects.
    • People can find out if they need to to anything by looking at the recommender metrics, e.g. sum(vpa_recommender_vpa_objects_count) by (api)
  • There seems to be an unused redis.yaml and redis_deprecated.yaml in the examples folder, and they still use v1beta2. I think we should also remove those two. Or are those used in a weird test setup somewhere?

@adrianmoisey
Copy link
Member Author

  • I think we should add a comment to the README similar to what we did for the migration from v1beta1 to v1beta2. Contrary to the previous api migration, there aren't any changes necessary for users (v1 didn't make any incompatible changes), except for changing v1beta2 to v1 in their VPA objects.

    • People can find out if they need to to anything by looking at the recommender metrics, e.g. sum(vpa_recommender_vpa_objects_count) by (api)

Yup, good call out here. Done in a193b1a

  • There seems to be an unused redis.yaml and redis_deprecated.yaml in the examples folder, and they still use v1beta2. I think we should also remove those two. Or are those used in a weird test setup somewhere?

This is a little bit of a a strange one. These aren't for v1beta2, they're for v1beta1.
From what I can tell, they are referenced in the MIGRATE.md file.

I was considering deleting the YAML files and the README, but I imagine that someone on an old (ancient?) version may need those instructions to migrate. Additionally, the MIGRATE.md file is quite out of date (ie: it doesn't mention v1)

I'm unsure if we should leave them as is, and remove them all in the future. Or just delete them all now, as they are in git history.

Thoughts?

@voelzmo
Copy link
Contributor

voelzmo commented Jan 8, 2025

This is a little bit of a a strange one. These aren't for v1beta2, they're for v1beta1.
From what I can tell, they are referenced in the MIGRATE.md file.

I didn't find references to the redis.yaml file there, but only references to the hamster_deprecated.yaml – I think we can safely remove it. I'm also fine to leave them in there, don't want to block this PR on that decision.

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adrianmoisey, voelzmo

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 8, 2025
@@ -118,107 +118,6 @@ spec:
type: object
served: true
storage: true
- name: v1beta2
Copy link
Member

Choose a reason for hiding this comment

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

what ensures all existing persisted data in v1beta2 format is migrated to the new storage format? is there a reason to remove this rather than switching it to served:false by default?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not too sure really. I had a look at what was done with v1beta1, and since it wasn't listed here, I assumed it just needed to be deleted.
Is there a best practice that we can follow to remove APIs?

Copy link
Contributor

@voelzmo voelzmo Jan 9, 2025

Choose a reason for hiding this comment

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

Hey @liggitt, thanks for jumping in here!

what ensures all existing persisted data in v1beta2 format is migrated to the new storage format

Just to elaborate on our thought process:
v1beta2 has storage: false since vpa release 0.10.0, which happened 3 years ago: 99a4a7a

Technically, I guess you're right that it could happen that people still have VPAs from 3 years ago in their clusters. In the previous occasion which @adrianmoisey mentioned, the onus was put on the user to do this: https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/MIGRATE.md#notice-on-switching-to-v1beta2-version-03x-to-040

We can also just set served: false and continue with this path, as you suggested.

EDIT: fixed the dates, sorry.

Copy link
Member

Choose a reason for hiding this comment

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

v1beta2 has storage: false since vpa release 0.10.0, which happened 3 years ago: 99a4a7a

unless something always automatically writes to all existing VPA objects, just the passage of time doesn't guarantee existing objects have been touched / updated

I would start by just setting served: false, since that ensures you won't break existing persisted data.

I also don't really know how user-facing this API is... consumers of this API who have users still writing manifests against v1beta2 would consider dropping serving of it a breaking change, and might not be able to consume updates any more... starting with served: false gives them a trivial way to switch back to served: true and start more active outreach / migration of their users

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 8, 2025
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/vertical-pod-autoscaler cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove v1beta2 API
4 participants