-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
Validate involvedObject.Namespace matches event.Namespace #30533
Conversation
Re-work of #16146 |
cc @derekwaynecarr @lavalamp @feihujiang from earlier related PR |
// Make sure event.Namespace and the involvedObject.Namespace agree | ||
if len(event.InvolvedObject.Namespace) == 0 { | ||
// event.Namespace must also be empty (or "default", for compatibility with old clients) | ||
if event.Namespace != "" && event.Namespace != api.NamespaceDefault { |
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.
Use api.NamespaceNone
for the empty string.
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.
done
dfb47bf
to
5b7edc1
Compare
GCE e2e build/test passed for commit 5b7edc1. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit 5b7edc1. |
Automatic merge from submit-queue |
Fixes #16036
This change is