-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[pvc] add init container to workspace to chown pvc mount folder #14096
Conversation
started the job as gitpod-build-pavel-14003.1 because the annotations in the pull request description changed |
started the job as gitpod-build-pavel-14003.2 because the annotations in the pull request description changed |
started the job as gitpod-build-pavel-14003.3 because the annotations in the pull request description changed |
started the job as gitpod-build-pavel-14003.4 because the annotations in the pull request description changed |
started the job as gitpod-build-pavel-14003.5 because the annotations in the pull request description changed |
/werft run with-preview 👍 started the job as gitpod-build-pavel-14003.9 |
3d851c6
to
f650173
Compare
started the job as gitpod-build-pavel-14003.16 because the annotations in the pull request description changed |
What does that do to workspace startup time? |
nothing. It executes almost instantenous (<1s), with only exception is a first image pull, which is fast since image is small and I believe we pack it into image for k3s as well.
none that I can think of. :(
I presume we need to ensure we pack busybox image for airgapped envs. Do you have a better image that I can use? 🤔 I was looking for anything similar that we already use and could not find anything. |
How about using the IWS from ring0? |
IWS runs in ws-daemon right? ws-daemon does not have access to PVC. Only workspace container mounts it. |
I completely forgot about it 😭 |
We could build our own container image with chown. Question: does ws-manager container image contains the chown binary? |
I would be hesitant on trying to add wsmanager image into workspace pod. It feels potentially unsafe somehow. 🤔 |
IWS could indeed be a way to do this. Although it runs on the node, we call IWS from ring0 (e.g. Also, we assemble a new filesystem layout in ring1 which might give us the opportunity to fix permissions. |
Depending on what this issue is blocking, we could also consider merging the change and look for a simpler solution immediately afterwards to remove the init container. |
@csweichel it blocks roll out of PVC to end users. (as without this fix some workspaces might become broken due to permission issue on /workspace folder). |
@csweichel leaving this PR unmerged blocks our ability to continue the rollout for PVC with regular workspaces. The feedback in #14003 indicates without this fix, it could break user workflows (there's a workaround, but we'd prefer to avoid needing it). My preference would be to ship this as is, assuming init-container failures result in a failed workspace start that:
Why? That'll give us a chance to focus on learning from a gradual rollout, which could include alternate designs (removing the init container, for example). @sagor999 if the |
I am not sure how that init container can fail... |
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.
Depending on what this issue is blocking, we could also consider merging the change and look for a simpler solution immediately afterwards to remove the init container.
My preference is not to block this, LGTM.
@sagor999 @csweichel @jenting |
@utam0k it only chowns folder, it is not recursive. so it should be very cheap. or am I wrong? |
@sagor999 Oh, I missed. You are right
|
Description
Adds init container when using PVC to ensure that PVC mounted folder has proper permissions (k8s mounts folder as root)
Related Issue(s)
Fixes #14003
How to test
Enable PVC
Open workspace.
ls -la /
and verify that/workspace
is owned bygitpod:gitpod
now.Release Notes
Documentation
Werft options:
If enabled this will build
install/preview
Valid options are
all
,workspace
,webapp
,ide