-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Launcher] support non-root containers in v2 compatible mode #5673
Comments
It's possible to specify the user that the container should run under. Backend can auto-set that on all containers. |
@Ark-kun do you mean our backend sets all containers to run as root by default? |
@Bobgy What is the plan to support non-root containers ? it is difficult to do any PoC with V2 in an enterprise setup due to this. Thanks. |
Hi @Nagarajj, this isn't on my priority list right now. |
I think what needs to be done is basically making sure all the local dirs v2 compatible mode launcher reads from/writes to should be accessible by all non-root users. @Nagarajj may I confirm do you require all containers to run as non-root? or is it OK for some KFP system containers to be root? e.g. we have a |
I'd imagine the easiest solution/workaround is to
For best practice, I think we should move the volume with launcher binary to So here's the design:
I think these are not very hard to achieve, maybe I can work on this too when I have some time, but welcome anyone who's interested. |
If we can remove restriction on Component container to be root it will be good. kfp-laucher init container can be root as we control that. |
Thanks for the clarification! I think my above design works under these assumptions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I'm working for an enterprise client that is very interested in this issue being resolved. They're in a sensitive data industry, and they are a major target for fraudsters. Hence, they have a need for tight security, and they have a policy of not allowing Kubeflow to run containers as root. Resolving this would allow them to use kubeflow pipelines native artifacts, rather than writing their own detached custom outputs. |
We also need all container to run a non-root. Since v2compatible is deprecated that should be possible @zijianjoy |
hey folks, is there any update on this? I'm guessing current state is that due to 2.0 coming along soon V2_COMPATIBLE wont be worked on? There are several companies running containers in rootless mode - Is. #6530 still up for consideration? |
…cations Launcher writes input artifacts to root paths /gcs, /minio, and /s3. These paths are not accessible by non-root users by default, which is problematic in locked-down Kubernetes installations and/or OpenShift. /gcs is currently a contract for KFP v2 python component wrappers, so the path cannot be changed. Mount an EmptyDir scratch volume to these paths to work around this. Additionally, /.local and /.cache are written to by pip, so add EmptyDir mounts for those too. Fixes: https://issues.redhat.com/browse/RHOAIENG-1889 Ref: kubeflow#5673 Ref: kubeflow#7345
Launcher writes input artifacts to root paths /gcs, /minio, and /s3. These paths are not accessible by non-root users by default, which is problematic in locked-down Kubernetes installations and/or OpenShift. /gcs is currently a contract for KFP v2 python component wrappers, so the path cannot be changed. Mount an EmptyDir scratch volume to these paths to work around this. Additionally, /.local and /.cache are written to by pip, so add EmptyDir mounts for those too. Fixes: kubeflow#5673 Fixes: kubeflow#7345
Launcher writes input artifacts to root paths /gcs, /minio, and /s3. These paths are not accessible by non-root users by default, which is problematic in locked-down Kubernetes installations and/or OpenShift. /gcs is currently a contract for KFP v2 python component wrappers, so the path cannot be changed. Mount an EmptyDir scratch volume to these paths to work around this. Additionally, /.local and /.cache are written to by pip, so add EmptyDir mounts for those too. Fixes: kubeflow#5673 Fixes: kubeflow#7345
I posted a PR to address this by doing individual EmptyDir mounts for all the affected locations. I had a hard time trying to move the paths (other than / |
For those watching, there is a more recent discussion about how this affects V2 (the full version) in: |
Launcher writes input artifacts to root paths /gcs, /minio, and /s3. These paths are not accessible by non-root users by default, which is problematic in locked-down Kubernetes installations and/or OpenShift. /gcs is currently a contract for KFP v2 python component wrappers, so the path cannot be changed. Mount an EmptyDir scratch volume to these paths to work around this. Additionally, /.local and /.cache are written to by pip, so add EmptyDir mounts for those too. Fixes: kubeflow#5673 Fixes: kubeflow#7345 Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com>
Launcher writes input artifacts to root paths /gcs, /minio, and /s3. These paths are not accessible by non-root users by default, which is problematic in locked-down Kubernetes installations and/or OpenShift. /gcs is currently a contract for KFP v2 python component wrappers, so the path cannot be changed. Mount an EmptyDir scratch volume to these paths to work around this. Additionally, /.local and /.cache are written to by pip, so add EmptyDir mounts for those too. Fixes: kubeflow#5673 Fixes: kubeflow#7345 Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com>
…10857) Launcher writes input artifacts to root paths /gcs, /minio, and /s3. These paths are not accessible by non-root users by default, which is problematic in locked-down Kubernetes installations and/or OpenShift. /gcs is currently a contract for KFP v2 python component wrappers, so the path cannot be changed. Mount an EmptyDir scratch volume to these paths to work around this. Additionally, /.local and /.cache are written to by pip, so add EmptyDir mounts for those too. Fixes: #5673 Fixes: #7345 Signed-off-by: Humair Khan <HumairAK@users.noreply.github.com> Co-authored-by: Greg Sheremeta <gshereme@redhat.com>
…cations Launcher writes input artifacts to root paths /gcs, /minio, and /s3. These paths are not accessible by non-root users by default, which is problematic in locked-down Kubernetes installations and/or OpenShift. /gcs is currently a contract for KFP v2 python component wrappers, so the path cannot be changed. Mount an EmptyDir scratch volume to these paths to work around this. Additionally, /.local and /.cache are written to by pip, so add EmptyDir mounts for those too. Fixes: https://issues.redhat.com/browse/RHOAIENG-1889 Ref: kubeflow#5673 Ref: kubeflow#7345
Currently, because the launcher writes input artifacts to paths like:
/gcs/xxx
/minio/xxx
/s3/xxxx
These paths are not accessible by non-Root users by default.
When using a component with non-Root image, launcher fails when preparing input/output artifacts.
Because
/gcs/xxx
is currently a contract for KFP v2 python component wrappers, we cannot change to a different path like/tmp/gcs/xxx
etc.The text was updated successfully, but these errors were encountered: