-
Notifications
You must be signed in to change notification settings - Fork 664
[RayOperator]: hardening kuberay operator security context #4243
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
Conversation
Signed-off-by: lilylinh <[email protected]>
andrewsykim
left a comment
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.
@vinayakankugoyal would appreciate your review on this
Future-Outlier
left a comment
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, cc @rueian for merge
Future-Outlier
left a comment
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.
cc @AndySung320 @justinyeh1995 @400Ping for review if you are interested
justinyeh1995
left a comment
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.
I tested this on a fresh kind cluster
kind create cluster --name kuberay-test-pr4243 --image=kindest/node:v1.26.0
kubectl create -k ray-operator/config/default
kubectl get deploy kuberay-operator -o yaml | yq '.spec.template.spec.containers[0].securityContext'The kuberay-operator Deployment’s container now has the hardened securityContext
{
"allowPrivilegeEscalation": false,
"capabilities": {
"drop": [
"ALL"
]
},
"readOnlyRootFilesystem": true,
"seccompProfile": {
"type": "RuntimeDefault"
}
}The operator works fine, and I also applied a sample RayCluster to confirm that reconciliation proceeds normally.
Looks good to me.
400Ping
left a comment
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.
Tested locally as well, LGTM.
|
LGTM, thanks for the clarification. |
Adds security hardening settings to
ray-operator/config/manager/manager.yamlto align with the Helm chart defaults and Kubernetes Pod Security Standards.##Changes:
capabilities.drop: [ALL]readOnlyRootFilesystem: trueWhy?
The Helm chart (
helm-chart/kuberay-operator/values.yaml) already includes these security settings by default. This PR ensures consistency between kustomize and Helm deployments.These settings follow:
Testing