Skip to content
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

generate PolicyRules from given subjects for impersonation deduplicate #2911

Conversation

yanfeng1992
Copy link
Member

@yanfeng1992 yanfeng1992 commented Dec 7, 2022

Signed-off-by: huangyanfeng [email protected]

What type of PR is this?

/kind bug

What this PR does / why we need it:

unified-auth-controller generates PolicyRules from given subjects for impersonation need deduplicate by name

image

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


`karmada-controller-manager`: generate PolicyRules from given subjects for impersonation deduplicate

@karmada-bot karmada-bot added the kind/bug Categorizes issue or PR as related to a bug. label Dec 7, 2022
@karmada-bot karmada-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Dec 7, 2022
@XiShanYongYe-Chang
Copy link
Member

XiShanYongYe-Chang commented Dec 7, 2022

Hi @yanfeng1992, I see you close the previous one, Is there any problem with it?

Besides, you can sign off refer to https://github.com/karmada-io/karmada/pull/2911/checks?check_run_id=9934498163

@XiShanYongYe-Chang
Copy link
Member

XiShanYongYe-Chang commented Dec 7, 2022

@yanfeng1992 nice finding, thanks for your fix~
Can you help add some ut cases to cover this case?

/assign

@yanfeng1992 yanfeng1992 force-pushed the fixbug_impersonation_subject_deduplicate branch from c7d780e to def244c Compare December 7, 2022 07:27
@karmada-bot karmada-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 7, 2022
@yanfeng1992
Copy link
Member Author

@yanfeng1992 nice finding, thanks for your fix~ Can you help add some ut cases to cover this case?

/assign

I added a ut case for this fix
9cdb9de

@XiShanYongYe-Chang
Copy link
Member

I added a ut case for this fix

Thanks~

Copy link
Member

@XiShanYongYe-Chang XiShanYongYe-Chang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Hi @yanfeng1992, can you help squash the commits into one? And help update the release note, just like:

`karmada-controller-manager`: generate PolicyRules from given subjects for impersonation deduplicate

/assign @RainbowMango

pkg/util/rbac.go Outdated Show resolved Hide resolved
@yanfeng1992 yanfeng1992 requested review from jwcesign and removed request for RainbowMango and Garrybest December 7, 2022 08:05
Signed-off-by: huangyanfeng <[email protected]>

generate PolicyRules add ut case for check deduplicate

Signed-off-by: huangyanfeng <[email protected]>

import format

Signed-off-by: huangyanfeng <[email protected]>
@yanfeng1992 yanfeng1992 force-pushed the fixbug_impersonation_subject_deduplicate branch from f68c2a9 to 1e15063 Compare December 8, 2022 02:32
@yanfeng1992
Copy link
Member Author

LGTM

Hi @yanfeng1992, can you help squash the commits into one? And help update the release note, just like:

`karmada-controller-manager`: generate PolicyRules from given subjects for impersonation deduplicate

/assign @RainbowMango

@XiShanYongYe-Chang I already squash the commits into one and update the release note. Are there any other questions that I need to deal with?

@RainbowMango
Copy link
Member

Are there any other questions that I need to deal with?

Just a reminder, you might need to add your email to GitHub Emails, otherwise, GitHub can't recognize you and can't count your contributions.

@XiShanYongYe-Chang
Copy link
Member

@XiShanYongYe-Chang I already squash the commits into one and update the release note. Are there any other questions that I need to deal with?

There's no other questions. Thanks for your contribution!
/lgtm

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 8, 2022
@RainbowMango
Copy link
Member

/approve

Thanks.

@XiShanYongYe-Chang
I think this is more like a cleanup, should we cherry-pick?

@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 8, 2022
@XiShanYongYe-Chang
Copy link
Member

I think this is more like a cleanup, should we cherry-pick?

Yes, this pr cleaned up the redundant item in the rules, and I think we do not need to cherry-pick it.

Hi @yanfeng1992, I update the related labels.
/kind cleanup
/remove-kind bug

@karmada-bot karmada-bot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. and removed kind/bug Categorizes issue or PR as related to a bug. labels Dec 8, 2022
@karmada-bot karmada-bot merged commit 8af17ca into karmada-io:master Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants