-
Notifications
You must be signed in to change notification settings - Fork 4.3k
feat: CPU startup boost in master #8813
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
base: master
Are you sure you want to change the base?
Conversation
Fix VPA startup boost validation error messages
Fix test failure after rebase
Add e2e tests for CPU startup boost
|
/cc adrianmoisey omerap12 |
|
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. |
omerap12
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! we already approved this in previous PRs 🥳
/lgtm
/label tide/merge-method-squash
|
oh good catch |
Update VPA version for startupboost feature
|
I'm good with this, thanks for doing it! |
|
/approve |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kamarabbas99, omerap12 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/label api-review |
soltysh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left there a few API related questions, but I didn't get too deep into the logic itself, other than just the validation bits.
| // +required | ||
| Type StartupBoostType `json:"type" protobuf:"bytes,1,opt,name=type"` | ||
| // factor specifies the factor to apply to the resource request. | ||
| // This field is to be used only when Type is "Factor". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // This field is to be used only when Type is "Factor". | |
| // This field is required when Type is "Factor". |
|
|
||
| // quantity specifies the absolute resource quantity to be used as the | ||
| // resource request and limit during the boost phase. | ||
| // This field is to be used only when Type is "Quantity". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // This field is to be used only when Type is "Quantity". | |
| // This field is required when Type is "Quantity". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sent #8828
| maxAllowedCpu: resource.QuantityValue{}, | ||
| featureGateEnabled: true, | ||
| expectError: fmt.Errorf("boost factor must be >= 1"), | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only error case you're testing, I'd add additional ones for type and factor|quantity specified, and probably also one for invalid type, even though that should be caught at the api server validation, but it doesn't hurt to have a test case covering that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other thing, the WithCPUStartupBoost method only modifies the VPA.spec, but doesn't change the container level StartupBoost, it would be good to also cover that case in test, to ensure the latter takes priority.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the relationship between the two, I missed that in the AEP-7862 and the code seems to be working on one or the other, depending on the location?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some more error cases in #8828. should it error out when both quantity and Factor are set ? Currently it doesnt.
contianer level startup boost has higher priority, added some test cases to cover that.
What type of PR is this?
/kind feature
/kind api-change
What this PR does / why we need it:
The CPU startup boost chnges were done on experimental branch, moving this to master.
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Which issue(s) this PR fixes:
#7862
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: