-
Notifications
You must be signed in to change notification settings - Fork 97
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
fixed permissions errors when applying multiple namespaces #183
Conversation
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.
Did a quick review, couple minor comments. Will try to review again later.
5e9f7df
to
5357c5b
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.
Glad to see tests here! Would be nice if there was also a drone job to run them automatically. I ran them locally and at least the new ones seem to work.
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.
Kudos for adding tests for this!
Have a couple of additional comments though, apologies for not sending them with the first review.
5357c5b
to
bb12631
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.
One trivial thing to fix
pkg/apply/desiredset_process_test.go
Outdated
assert.NoError(t, err) | ||
} | ||
|
||
if tt.expectedCalls > 0 { |
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.
Should be >=
to fully validate the first test case.
bb12631
to
e296697
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
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.
Great job on adding tests! 🎉 🥇
rancher/rancher#34712
Problem
When users try to modify resources in multiple namespaces wrangler attempts to list them across all namespaces. Most users do not have permission to list resources across all namespaces and an error is returned.
Solution
When applying resources gather what namespaces will be affected make multiple searches across the specified namespaces.
Testing
I tested this and confirmed users will still see permission errors if they attempt to create a resource in a namespace that they do not have access to. I also tested creating resources that are not namespaced with a user that has access to them.