-
Notifications
You must be signed in to change notification settings - Fork 310
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
exec updater errors when using non-root user #3060
Comments
The error message is:
|
The fundamental problem is that CRI (the container runtime interface) does not support execution as a particular user, here are some threads @landism found on it: kubernetes/kubernetes#30656 I wonder if Tilt dev images should just always set the image user to root if you're using live_update |
I have just stumbled up on this issue I think. Scenario: Kubernetes cluster, each pod according to our design rules must have a securityContext, specifying a non-root user. What I have done here is that in my Tiltfile, I have a very customizable parser and info collector logic for the YAML files, I use it to distribute non-workload objects into different groups mostly (for readablity). I added a segment where I remove the securityContext parts from the YAML file if the object is mine and I build it. This is why I love the Tiltfile :) Just one remark, I would not add this under the hood automatically, only if it is switchable on-off, because modifying the system under test like this might cause trouble elsewhere in the user's environment/codebase. So far this WA was +5 lines of Tiltfile code. Without it, everything works OK just Tilt will always need to rely on docker building, no live update possible. With this fix, I was able to live-update properly. |
@zkutasi that's awesome! I don't have a good sense, do you think this fix would be applicable for other people's use cases as well? If yes, you might consider submitting an extension so other people can make use of the code! |
@zkutasi Do you mind sharing the 5 lines? I think we might have the same issue. Thanks! |
@markgarrigan , sure:
I do not feel this is extension-worthy, and whether I am able to do it, I have absolutely no time nowadays. |
Repro steps:
tilt up
with microk8s and try to modify a fileExpected result:
Tilt should sync the file successfully
Actual result:
Tilt fails with cryptic errors
Branch with repro code:
https://github.com/windmilleng/nodejs-express-k8s/tree/nicks/user
Snapshot:
https://cloud.tilt.dev/snapshot/AdyPt-YLRPKSa_XuHBg=
(see the alert)
Thanks to Marlow in the #tilt k8s channel for reporting
The text was updated successfully, but these errors were encountered: