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

feat: add client-go oidc auth provider #4883

Merged
merged 1 commit into from
May 8, 2024

Conversation

guozheng-shen
Copy link
Contributor

What type of PR is this?
/kind feature

What this PR does / why we need it:
In our clusters, OIDC authentication is required for cluster operation auditing and access control. This is also a common authentication method. I believe it can be integrated into Karmada.
Which issue(s) this PR fixes:
NONE
Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@karmada-bot karmada-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 28, 2024
@karmada-bot
Copy link
Collaborator

Welcome @guozheng-shen! It looks like this is your first PR to karmada-io/karmada 🎉

@karmada-bot karmada-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 28, 2024
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.

Hi @guozheng-shen thanks for your contribution.

Do all components need to be imported into this package? I understand that it is only used when karmadactl joins.

@guozheng-shen guozheng-shen force-pushed the feat-oidc branch 2 times, most recently from a77c621 to 6054f94 Compare April 29, 2024 03:06
@guozheng-shen
Copy link
Contributor Author

@XiShanYongYe-Chang ok, it's done, pls review again, Thanks.

@XiShanYongYe-Chang
Copy link
Member

Hi @guozheng-shen can you help describe how we can use OIDC for certification with this PR?

@guozheng-shen
Copy link
Contributor Author

@XiShanYongYe-Chang Our kubeconfig uses oidc to access the k8s cluster. When I use karmadactl to join my member cluster, an error occurs causing the member cluster to fail to join (panic: No Auth provider found for the name "oidc", we need to import (_"k8s.io/client-go/plugin/pkg/client/auth/oidc") when karmadactl run. It will provide a newOIDCAuthProvider

Signed-off-by: guozheng-shen <179826407@qq.com>
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.13%. Comparing base (fff3699) to head (82ac4ef).
Report is 22 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4883      +/-   ##
==========================================
+ Coverage   53.07%   53.13%   +0.06%     
==========================================
  Files         251      251              
  Lines       20389    20417      +28     
==========================================
+ Hits        10821    10849      +28     
+ Misses       8855     8854       -1     
- Partials      713      714       +1     
Flag Coverage Δ
unittests 53.13% <ø> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

Thanks
/lgtm
/cc @RainbowMango

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label May 7, 2024
@RainbowMango
Copy link
Member

/assign

Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/approve

@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 May 8, 2024
@karmada-bot karmada-bot merged commit 81b8c4c into karmada-io:master May 8, 2024
12 checks passed
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/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants