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

fix: ClusterRole Aggregation #221

Merged
merged 8 commits into from
Mar 12, 2024
Merged

fix: ClusterRole Aggregation #221

merged 8 commits into from
Mar 12, 2024

Conversation

sempex
Copy link
Contributor

@sempex sempex commented Mar 8, 2024

Kubernetes Supports ClusterRole Aggregation, enabling the aggregation of one ClusterRole into another. For more details, refer to the official Kubernetes Documentation here.

This functionality allows a ClusterRole lacking a ClusterRoleBinding or a RoleBinding to remain usable. Currently, Kor does not handle this scenario. Consequently, the ClusterRoles in use are not properly listed through Kor. The proposed Pull Request addresses this issue.

@yonahd
Copy link
Owner

yonahd commented Mar 11, 2024

Hi @sempex
Thank for the pr. Can you please add a test for this?

@sempex
Copy link
Contributor Author

sempex commented Mar 11, 2024

Hi @sempex Thank for the pr. Can you please add a test for this?

Sure will try to add one 👍

@sempex
Copy link
Contributor Author

sempex commented Mar 11, 2024

@yonahd I added my changes to the testcases

@codecov-commenter
Copy link

codecov-commenter commented Mar 11, 2024

Codecov Report

Attention: Patch coverage is 60.60606% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 47.58%. Comparing base (c421565) to head (5b58559).

Files Patch % Lines
pkg/kor/clusterroles.go 55.17% 8 Missing and 5 partials ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #221      +/-   ##
==========================================
+ Coverage   47.48%   47.58%   +0.09%     
==========================================
  Files          32       32              
  Lines        2883     2915      +32     
==========================================
+ Hits         1369     1387      +18     
- Misses       1345     1354       +9     
- Partials      169      174       +5     

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

Copy link
Owner

@yonahd yonahd left a comment

Choose a reason for hiding this comment

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

Looks good!
A couple small comments

pkg/kor/create_test_resources.go Outdated Show resolved Hide resolved
pkg/kor/clusterroles.go Outdated Show resolved Hide resolved
@sempex
Copy link
Contributor Author

sempex commented Mar 12, 2024

Looks good! A couple small comments

Fixed it 🚀

Copy link
Owner

@yonahd yonahd left a comment

Choose a reason for hiding this comment

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

LGTM
Thank you!

@yonahd yonahd merged commit 0d1014a into yonahd:main Mar 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants