-
Notifications
You must be signed in to change notification settings - Fork 499
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
feat: add tolerations handling to kubernetes driver #1045
Conversation
@szeber missing DCO |
docs/reference/buildx_create.md
Outdated
@@ -140,6 +140,7 @@ Passes additional driver-specific options. Details for each driver: | |||
- `limits.cpu` - Sets the limit CPU value specified in units of Kubernetes CPU. Example `limits.cpu=100m`, `limits.cpu=2` | |||
- `limits.memory` - Sets the limit memory value specified in bytes or with a valid suffix. Example `limits.memory=500Mi`, `limits.memory=4G` | |||
- `nodeselector="label1=value1,label2=value2"` - Sets the kv of `Pod` nodeSelector. No Defaults. Example `nodeselector=kubernetes.io/arch=arm64` | |||
- `tolerations="key=foo,value=bar;key2=foo2,operator=exists"` - Sets the `Pod` tolerations. Accepts the same values as the kube manifest tolerations. Key-value pairs are separated by `,`, tolerations are separated by `;`. No Defaults. Example `tolerations=operator=exists` |
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.
Can we have effect
examples?
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 an example there. Would it make sense to add a link here to the relevant kube docs? https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
059860c
to
70baf80
Compare
Thanks @AkihiroSuda @tonistiigi, updated, could you please recheck? |
CI failing
|
70baf80
to
710aaad
Compare
@AkihiroSuda hopefully this fixes the lint |
Signed-off-by: Zsolt <[email protected]>
710aaad
to
3f65177
Compare
@AkihiroSuda hopefully the last try, sorry :) |
@szeber thanks for creating this change. I tried to use it in my env, but for some reason it's not working:
Can you suggest me, what I am doing wrong? |
1 similar comment
@szeber thanks for creating this change. I tried to use it in my env, but for some reason it's not working:
Can you suggest me, what I am doing wrong? |
@ktaborski I don't think you did anything wrong, there is a bug in how the options are getting parsed. @AkihiroSuda by the looks of it both this and nodeselector is broken when |
So for example
|
You need to either quote it correctly |
@tonistiigi Yes, that is one part, but the CSV parser doesn't like it quoted that way. what seems to work for node selectors is |
This PR is to add support for Kubernetes tolerations. Should support all current tolerations options and adding multiple tolerations. This should cover the use cases listed in #377, but it doesn't add the full manifests support.
Adding full support to manifests would be a much more flexible option, but this should solve the main pain points listed in that ticket.