-
Notifications
You must be signed in to change notification settings - Fork 462
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
Update securityContext values.yaml for kuberay-operator to safe defaults. #1896
Conversation
…lts. I noticed that the securityContext of kube-ray operator by default is empty and requires it to be set to secure defaults manually. We should try to be secure by default where possible. Signed-off-by: Vinayak Goyal <[email protected]>
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.
Thank you for the contribution! I am not familiar with securityContext
. How do you manually test it? In my experience, under the restricted Pod security standard, the spec.securityContext.seccompProfile
setting is necessary. See #750 (comment) for more details.
In addition, different Kubernetes distributions (e.g. OpenShift) seem to have different PSS. For example, OpenShift appears to report an error if we set the seccompProfile
(#750 (comment)).
In those cases, adding securityContext
might cause some users to fail in launching KubeRay if different Kubernetes distributions have varying PSS. Security is very important, but the primary goal of the default Helm chart values is to enable users to try KubeRay with ease. My suggestion is to leave the securityContext
empty and include comments with suggested secure configurations. WDYT?
Ah I meant to add PSS is defined by Kuberenetes, https://kubernetes.io/docs/concepts/security/pod-security-standards/ so its alarming that they have something different. Setting In terms of how I tested it was by deploying the ray-operator daemonset to a kind cluster and a GKE cluster and check if it came up. However I didn't really schedule a job or anything like that. I am happy to test more scenarios if you'd like. |
Signed-off-by: Vinayak Goyal <[email protected]>
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.
In terms of how I tested it was by deploying the ray-operator daemonset to a kind cluster and a GKE cluster and check if it came up.
Would you mind providing more details about this? Which security level did you test, restricted
?
Here is the setup I used for kind
Note: see how the error requires securityContext.seccompProfile.type to be set to RuntimeDefault?
|
Thank you for the detailed explanation #1896 (comment)! Would you mind checking the CI failures? You can check this doc for more details about how to run "end-to-end tests" or "configuration tests" locally. |
@kevin85421 - that issue seems related to docker-library/golang#467. Anyway for us to bump the version with fix available? |
@vinayakankugoyal Sorry for the late response. I am currently at our company's offsite event.
I am not sure which version you are actually referring to (Golang, Docker, or the image?), but you can try it. |
/cc |
@kevin85421 - the Docker version that is running in the CI. As explained in this comment we would need to bump the docker versions now because of the golang version we are using to build this image. (Maybe we should clarify that in the docs as well.) |
@vinayakankugoyal would you mind opening an issue to track the progress of adbc593? Thanks! |
Thanks for the approval! Done! #1935 |
Why are these changes needed?
I noticed that the securityContext of kube-ray operator by default is empty and requires it to be set to secure defaults manually. We should try to be secure by default where possible.
Related issue number
N/A
Checks