yonahd / kor

A Golang Tool to discover unused Kubernetes Resources
MIT License
1.04k stars 96 forks source link

add clusterrole support #198

Closed hagay3 closed 9 months ago

hagay3 commented 9 months ago

fixes #66

yonahd commented 9 months ago

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 commented 9 months ago

@yonahd let me know if you have any other feedback

hagay3 commented 9 months ago

@yonahd waiting for CI approval

yonahd commented 9 months ago

@yonahd waiting for CI approval

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

hagay3 commented 9 months ago

@yonahd another CI approval ...

hagay3 commented 9 months ago

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

yonahd commented 9 months ago

@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 commented 9 months ago

@yonahd hopefully now i'll pass ..

codecov-commenter commented 9 months ago

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 :warning:
pkg/kor/all.go 0.00% 13 Missing :warning:
pkg/kor/delete.go 0.00% 7 Missing :warning:
pkg/kor/multi.go 0.00% 4 Missing :warning:

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

Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

hagay3 commented 9 months ago

@doronkg thanks for the review, fixed :)