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

Add subresource status for vpa #5911

Merged
merged 1 commit into from
Jul 3, 2023

Conversation

wu0407
Copy link
Contributor

@wu0407 wu0407 commented Jun 29, 2023

Add status field in subresource on crd yaml and add new ClusterRole system:vpa-actor to patch /status subresource.
The metadata.generation only increase on vpa spec update.
Fix e2e test for patch and create vpa

What type of PR is this?

/kind bug
/kind failing-test
/kind api-change

What this PR does / why we need it:

Current vpa crd has empty subresource field, that leads to metadata.generation increase on vpa status update.
The controller-runtime has GenerationChangedPredicate to filter out update status event for cr, but it not work for vpa.
This PR add status field in subresource on crd yaml and add new ClusterRole system:vpa-actor to patch /status subresource.
The metadata.generation only increase on vpa spec update.

Which issue(s) this PR fixes:

Fixes #5675

Special notes for your reviewer:

Previous pull request is #5680 #5766 and be revert #5738 #5897, because of e2e test failed #5727.

This PR compare with previous PR #5766, only add subresources in v1beta2.
https://github.com/kubernetes/autoscaler/compare/master...wu0407:autoscaler:add-status-subresource?expand=1#diff-b2539c9dfcc061e38b1961b5e52a8aed413750d74b71c018a3f6ca7dfc871efaR752-R753
@kwiesmueller @jbartosik

Does this PR introduce a user-facing change?

Added the /status subresource to VPA
action required: If you're installing VPA with different means than the `hack/vpa-up.sh` script, you need to add the ClusterRole `system:vpa-status-actor` and corresponding ClusterRoleBinding yourself. Otherwise VPA will no longer be able to update the recommendations!
If you create vpa with status,  status be ignored in apiserver, so need to update status after create vpa.

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


@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. kind/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 29, 2023
@k8s-ci-robot k8s-ci-robot requested a review from jbartosik June 29, 2023 08:14
@k8s-ci-robot k8s-ci-robot requested a review from voelzmo June 29, 2023 08:14
@k8s-triage-robot
Copy link

This PR may require API review.

If so, when the changes are ready, complete the pre-review checklist and request an API review.

Status of requested reviews is tracked in the API Review project.

@wu0407 wu0407 force-pushed the add-status-subresource branch from 54a2fb2 to b648ea1 Compare June 29, 2023 09:36
@voelzmo
Copy link
Contributor

voelzmo commented Jun 30, 2023

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 30, 2023
Copy link
Collaborator

@jbartosik jbartosik left a comment

Choose a reason for hiding this comment

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

I don't see any problems but previous 2 times we didn't spot problems in review either.

I'd rather not roll back this for the 3rd time. I think we should run e2e tests before merginig.

@kwiesmueller
Copy link
Member

/hold
I'll run e2e tests.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 30, 2023
@kwiesmueller
Copy link
Member

@wu0407 I'm rebasing onto upstream/master to get some changes needed to run e2e tests needed.
Please do the same to this PR just to be sure I'm testing the same changes as we have here.

@kwiesmueller
Copy link
Member

./hack/run-e2e-tests.sh full-vpa passed

@kwiesmueller
Copy link
Member

/hold cancel
/lgtm

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 30, 2023
Add status field in subresource on crd yaml and add new ClusterRole system:vpa-actor to patch /status subresource.
The `metadata.generation` only increase on vpa spec update.
Fix e2e test for patch and create vpa
@wu0407 wu0407 force-pushed the add-status-subresource branch from b648ea1 to 1f342ff Compare July 3, 2023 03:10
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 3, 2023
@wu0407
Copy link
Contributor Author

wu0407 commented Jul 3, 2023

@wu0407 I'm rebasing onto upstream/master to get some changes needed to run e2e tests needed. Please do the same to this PR just to be sure I'm testing the same changes as we have here.

rebase done

Copy link
Collaborator

@jbartosik jbartosik left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve
🤞

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 3, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jbartosik, wu0407

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

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/api-change Categorizes issue or PR as related to adding, removing, or otherwise changing an API kind/bug Categorizes issue or PR as related to a bug. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vpa CRD not contain status subresource
6 participants