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

add clusterrole support #198

Merged
merged 16 commits into from Feb 14, 2024

Conversation

hagay3
Copy link
Contributor

@hagay3 hagay3 commented Feb 1, 2024

fixes #66

@yonahd
Copy link
Owner

yonahd commented Feb 1, 2024

Can you please add this to https://github.com/yonahd/kor/blob/main/pkg/kor/delete.go
https://github.com/yonahd/kor/blob/main/pkg/kor/multi.go
And also add tests similar to the role function?

@hagay3
Copy link
Contributor Author

hagay3 commented Feb 7, 2024

@yonahd let me know if you have any other feedback

@hagay3
Copy link
Contributor Author

hagay3 commented Feb 8, 2024

@yonahd waiting for CI approval

@yonahd
Copy link
Owner

yonahd commented Feb 8, 2024

@yonahd waiting for CI approval

Looks like it's still failing on things that needed to be changed based on recent changes

@hagay3
Copy link
Contributor Author

hagay3 commented Feb 10, 2024

@yonahd another CI approval ...

@hagay3
Copy link
Contributor Author

hagay3 commented Feb 11, 2024

@yonahd I'm not sure what is the issue with linting ?

@yonahd
Copy link
Owner

yonahd commented Feb 11, 2024

@yonahd I'm not sure what is the issue with linting ?

Hey
From a quick look you are taking a value for err and not using it (the error should be handled)

@hagay3
Copy link
Contributor Author

hagay3 commented Feb 11, 2024

@yonahd hopefully now i'll pass ..

@codecov-commenter
Copy link

codecov-commenter commented Feb 11, 2024

Codecov Report

Attention: 62 lines in your changes are missing coverage. Please review.

Comparison is base (910be54) 44.61% compared to head (c880a17) 45.36%.

Files Patch % Lines
pkg/kor/clusterroles.go 62.00% 25 Missing and 13 partials ⚠️
pkg/kor/all.go 0.00% 13 Missing ⚠️
pkg/kor/delete.go 0.00% 7 Missing ⚠️
pkg/kor/multi.go 0.00% 4 Missing ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #198      +/-   ##
==========================================
+ Coverage   44.61%   45.36%   +0.74%     
==========================================
  Files          30       31       +1     
  Lines        2517     2665     +148     
==========================================
+ Hits         1123     1209      +86     
- Misses       1235     1284      +49     
- Partials      159      172      +13     

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

pkg/kor/all.go Outdated Show resolved Hide resolved
pkg/kor/clusterroles.go Outdated Show resolved Hide resolved
pkg/kor/delete.go Outdated Show resolved Hide resolved
pkg/kor/delete.go Outdated Show resolved Hide resolved
@hagay3
Copy link
Contributor Author

hagay3 commented Feb 12, 2024

@doronkg thanks for the review, fixed :)

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 overall.
Mainly one issue with the behavior of the search

coverage.txt Outdated Show resolved Hide resolved
pkg/kor/all.go Outdated Show resolved Hide resolved
pkg/kor/all.go Outdated Show resolved Hide resolved
pkg/kor/clusterroles.go Outdated Show resolved Hide resolved
@hagay3 hagay3 requested a review from yonahd February 13, 2024 08:43
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.

One more comment.
After that fix we should be able to merge

pkg/kor/clusterroles.go Outdated Show resolved Hide resolved
@hagay3 hagay3 requested a review from yonahd February 14, 2024 09:01
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 for the effort!

@yonahd yonahd merged commit 04c7b5e into yonahd:main Feb 14, 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.

Support finding unused Cluster Roles
4 participants