-
Notifications
You must be signed in to change notification settings - Fork 321
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
ray-operator: disallow pod creation in namespaces outside of RayCluster namespace #1951
Conversation
ca43795
to
d06aafe
Compare
Do any release notes need to be update? |
podTemplate.ObjectMeta.Namespace = instance.Namespace | ||
log.Info("Setting pod namespaces", "namespace", instance.Namespace) | ||
} | ||
podTemplate.ObjectMeta.Namespace = instance.Namespace |
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.
Maybe its better to return an error in this case overriding user values seems wrong?
podTemplate.ObjectMeta.Namespace = instance.Namespace | ||
log.Info("Setting pod namespaces", "namespace", instance.Namespace) | ||
} | ||
podTemplate.ObjectMeta.Namespace = instance.Namespace |
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.
could you add a comment here explaining why we are overriding the namespace.
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.
sure, added
The testing section of the PR description needs to be updated. How was this tested? |
I was waiting for feedback from @kevin85421 before writing tests. I've added tests now. Thanks |
d06aafe
to
52e6aba
Compare
…r namespace Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
52e6aba
to
20db4e9
Compare
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.
LGTM. @vinayakankugoyal Do you have any other comments? I will merge this PR after your approval.
Why are these changes needed?
Currently it is possible to specify a namespace in the pod template that is different from the namespace of the RayCluster. I haven't found a use-case where this is needed. This PR disallows namespaces for Pods outside the namespace of the RayCluster.
Related issue number
Checks