Skip to content
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

OpenShift compatibility (RunAsUser) #87

Open
criztovyl opened this issue Aug 17, 2022 · 2 comments
Open

OpenShift compatibility (RunAsUser) #87

criztovyl opened this issue Aug 17, 2022 · 2 comments

Comments

@criztovyl
Copy link

criztovyl commented Aug 17, 2022

When using ktunnel with OpenShift, for me ktunnel expose does not reliably work because the Deployment created has RunAsUser, which OCP does not allow unless you adjust it's security configuration.

OpenShift runs containers with non-root user by default, and the Deployment works fine when I manually remove the RunAsUser.

So far the bug, I am open to providing a PR, but maybe you already have a solution in mind?

@ciis0
Copy link

ciis0 commented Aug 17, 2022

ktunnel/pkg/k8s/common.go

Lines 169 to 171 in fbd3f4e

SecurityContext: &apiv1.SecurityContext{
RunAsUser: &containerUid,
},

@gms1
Copy link

gms1 commented Aug 28, 2024

containerUid is hardcoded set to 1000 so that the container runs as non-root
05b502b

A simple way to run the container as non-root, but without running into this issue, would be to specify the non-root user via Dockerfile and not via "RunAsUser"
e.g. like this
https://github.com/gms1/ktunnel/blob/develop/Dockerfile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants