-
Notifications
You must be signed in to change notification settings - Fork 7
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
Does kbatch *require* kbatch-proxy? #14
Comments
The job created in kbatch/kbatch/kbatch/_backend.py Line 42 in 083ebb4
kbatch-proxy component does do a bit https://github.com/kbatch-dev/kbatch/blob/main/kbatch-proxy/kbatch_proxy/patch.py to update the job which includes
I suspect that both of these could be moved client side. We would just need the server-side to verify that the namespace is actually correct? My motivation for putting the volume / configmap stuff on the server side was because IIUC the ConfigMap has to exist (with a name) before it can be used as a volume. So we have to create that first, then update the volumes to refer to it by its name. |
Just wanted to note that I 100% agree with the goal:
So if we can sort out these issues and have the proxy just validate, rather than patch, stuff that'd be great. |
I think if we connect this to #6, we can simplify it. If the client picks a reasonably unique name, it can either:
or
We should be able to handle name conflicts fine, since they will fail to create with kubernetes 409 conflict. It is okay to create a Job which references a configmap that doesn't exist. It just won't start until the configmap is found and ready to mount. With this approach, I think the client can create the whole thing, and kube-proxy should only need to:
Effectively, that moves ~all of We might even be able to do something clever and accept an arbitrary list of resources, a la |
Do you think https://kubernetes.io/docs/reference/using-api/server-side-apply/ may help here, if we are to try doing things similar to |
It would be awesome if there was a way to make kbatch work without kbatch-proxy. This throws the security model for a toss a little, but would allow powerful use cases where there's just one user per cluster. You can spin up a k8s cluster while working locally, run some jobs on it, and then tear down the cluster - making them truly ephemeral. This becomes a lot more difficult when there are serverside components required for it to work.
The text was updated successfully, but these errors were encountered: