-
Notifications
You must be signed in to change notification settings - Fork 65
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
Run exec commands as specified user #34
Comments
That would be useful but we need to be cautious. Running as root may work on some Kubernetes clusters and not on others with more restrictive security policies. That would lead in situations where a devfile works on one cluster and fails on another one... cc @elsony @kadel @davidfestal what do you think? |
I see the usefulness here as well, but agree with @l0rd; this would be exclusively Kubernetes functionality, as runAsUser is typically not possible on OpenShift clusters (nor Kubernetes clusters for some configurations). The general recommendation on Kubernetes is to not allow running as root, as well. In general, relying on the default user for a container has been nothing but a headache for me. However, it might also unblock some use cases, so it's definitely worth considering. |
Reviewed and approved |
For the records PodSecurityContext has |
I started implementing the mode here, but now I have a question: |
@davidfestal yes you are right |
we cant' The only way how we could execute the command as a different user would be using
+1 |
Community call discussion 3/28:
|
When running exec commands from a devFile within a container we may need to run the commands as a different user to the user that is the default user within the container. I am therefore proposing we have a
runAsUser
within theexec
, for example:So in this example there is a need to run some setup that requires to be run as
root
, and then some other setup that needs to be run asjava_user
.It is not easy to switch userids within a shell script (bash) then different shell scripts need to be run and need to be run as different userids.
The text was updated successfully, but these errors were encountered: