-
Notifications
You must be signed in to change notification settings - Fork 113
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 Tolerations to Build and BuildRun objects #1711
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
872db31
to
462d9bb
Compare
4ecfc21
to
dfe25d5
Compare
e449fbd
to
03b3b21
Compare
3e66b55
to
43382a6
Compare
/kind feature |
Ok, this is ready for review/discussion. I was unsure how the implementation should look for the strategic merge json patch mentioned in https://github.com/shipwright-io/community/blob/main/ships/0039-build-scheduler-opts.md#tolerations This currently works and patches the BuildRun/Build object:
But didn't know if that was all that was required or what that should ideally look like. Also looking for input on what implementing the subset of tolerations functionality should ideally look like, or if the current implementation is ok (failing validation if unsupported fields are specified/ always setting "NoSchedule"). I've also left the validaitons on the Shipwright end to enforce the simpler requirements here, and let Kubernetes do the rest of the toleration validation with the full ruleset. |
Signed-off-by: Dylan Orzel <[email protected]>
Signed-off-by: Dylan Orzel <[email protected]>
Signed-off-by: Dylan Orzel <[email protected]>
43382a6
to
c35d173
Compare
// only support "NoSchedule" effect, make sure it is set | ||
for i := range taskRunTolerations { | ||
taskRunTolerations[i].Effect = corev1.TaintEffectNoSchedule | ||
} |
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.
Would not that be rather something for the validation logic ?
@@ -202,6 +202,34 @@ jobs: | |||
|
|||
exit 1 | |||
fi | |||
|
|||
kubectl wait --for=condition=Ready=true node/kind-worker --timeout=60s |
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.
Suggestion: create a for
loop to iterate over the three nodes.
Changes
Fixes #1636
Submitter Checklist
See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.
Release Notes