-
Notifications
You must be signed in to change notification settings - Fork 167
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 priority classes to builds based on change reason #908
Conversation
Codecov Report
@@ Coverage Diff @@
## main #908 +/- ##
==========================================
+ Coverage 69.75% 69.79% +0.03%
==========================================
Files 119 120 +1
Lines 5423 5452 +29
==========================================
+ Hits 3783 3805 +22
- Misses 1271 1276 +5
- Partials 369 371 +2
Continue to review full report at Codecov.
|
f0f623c
to
d6dd824
Compare
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 have one question, otherwise LGTM.
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.
@samj1912 provided the link to https://kubernetes.io/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/#marking-pod-as-critical in answer to my question. LGTM.
cae17ca
to
aecaab7
Compare
@matthewmcnew @tylerphelan @tomkennedy513 could you please review? |
@matthewmcnew updated to a spec field in commit 58bf3fc It should not be a blocker to this PR but I can't get openapi gen to work correctly and it is producing a large diff. Is there a specific version I should use? |
58bf3fc
to
c2d0377
Compare
Get correct version with:
|
Signed-off-by: Sambhav Kothari <skothari44@bloomberg.net>
Signed-off-by: Sambhav Kothari <skothari44@bloomberg.net>
832bfbb
to
1dc2f63
Compare
@tylerphelan thanks for that. codegen and openapigen should both be in sync now. I noticed some of the codegen changes were not applied from previous PRs so updated those as well. |
832bfbb
to
3b4df7a
Compare
Signed-off-by: Sambhav Kothari <skothari44@bloomberg.net>
code gen seems to be correct, I think we can merge |
Signed-off-by: Sambhav Kothari skothari44@bloomberg.net
Fixes #774
This PR adds priority class names to build pods based on the change that triggered it. For user triggered changes (changes in config, source resolver, manual trigger) - the pod is created with a high priority. For operator based changes (stack/buildpack change) it is created with low priority.
The whole feature is currently gated behind a flag which is set to false by default.
The way this works is that based on the build change, an annotation is added to the build with the priority class, which the build adds directly to the pod's priorityclass name. I also added some default priority classes which match the classes that kpack expects, but users are free to update these priority classes to match their cluster configurations if they need to.
The high priority class is currently hard coded to
kpack-build-high-priority
and similarlykpack-build-low-priority
for the low priority class.