-
Notifications
You must be signed in to change notification settings - Fork 20
feat: block member label modification through DP #36
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
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.
Pull Request Overview
This PR blocks direct modification of fleet member cluster labels through the dataplane unless performed by the RP client.
- Introduces a new constant and check in the user validation logic to deny label modifications by non-RP clients.
- Adds the helper function isRPClient to identify RP clients based on username and group membership.
- Updates the webhook test suite to verify that label modifications are allowed for RP clients and denied for non-RP clients.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pkg/webhook/validation/uservalidation.go | Adds constant and logic to deny label modifications by non-RP clients along with a new isRPClient helper function. |
| pkg/webhook/fleetresourcehandler/fleetresourcehandler_webhook_test.go | Adds test cases to verify the new label modification restrictions. |
pkg/webhook/fleetresourcehandler/fleetresourcehandler_webhook_test.go
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
c86ddf2 to
4579fb3
Compare
Signed-off-by: audrastump <a.e.stump@wustl.edu>
674fee6 to
cb856d4
Compare
Signed-off-by: audrastump <a.e.stump@wustl.edu>
Signed-off-by: audrastump <a.e.stump@wustl.edu>
Signed-off-by: audrastump <a.e.stump@wustl.edu>
Signed-off-by: audrastump <a.e.stump@wustl.edu>
Signed-off-by: audrastump <a.e.stump@wustl.edu>
Signed-off-by: audrastump <a.e.stump@wustl.edu>
Signed-off-by: audrastump <a.e.stump@wustl.edu>
Signed-off-by: audrastump <a.e.stump@wustl.edu>
Signed-off-by: audrastump <a.e.stump@wustl.edu>
Signed-off-by: audrastump <a.e.stump@wustl.edu>
jim-minter
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.
LGTM
Signed-off-by: audrastump <a.e.stump@wustl.edu>
Signed-off-by: audrastump <a.e.stump@wustl.edu>
britaniar
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.
LGTM
pkg/webhook/fleetresourcehandler/fleetresourcehandler_webhook_test.go
Outdated
Show resolved
Hide resolved
pkg/webhook/fleetresourcehandler/fleetresourcehandler_webhook_test.go
Outdated
Show resolved
Hide resolved
pkg/webhook/fleetresourcehandler/fleetresourcehandler_webhook_test.go
Outdated
Show resolved
Hide resolved
pkg/webhook/fleetresourcehandler/fleetresourcehandler_webhook_test.go
Outdated
Show resolved
Hide resolved
Signed-off-by: audrastump <a.e.stump@wustl.edu>
Description of your changes
Blocking users from modifying member cluster labels directly through the dataplane unless they are the RP client. Not mergeable until member label changes are available through CLI.
Fixes #
I have:
make reviewableto ensure this PR is ready for review.How has this code been tested
Unit tests
Special notes for your reviewer