-
Notifications
You must be signed in to change notification settings - Fork 98
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(GetUnusedAll): skip non-namespaced resources if --include-namespaces flag is used #258
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #258 +/- ##
==========================================
- Coverage 43.60% 43.45% -0.15%
==========================================
Files 58 58
Lines 2768 2775 +7
==========================================
- Hits 1207 1206 -1
- Misses 1382 1388 +6
- Partials 179 181 +2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment.
We might want to later also support a flag for including cluster resources but I'm not sure if its needed.
We can have a follow-up in a discussion or create a backog issue for that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
Thanks
What this PR does / why we need it
Currently, when running
kor all -n example
, unused non-namespaced resources will be displayed as well.This PR fixes
GetUnusedAll()
function to skip non-namespaced resources if--include-namespaces
flag is used.--include-namespaces
flag is considered used if the amount of listed namespaces is greater than 0.In addition, this PR fixes flag typos across the code/docs:
--include-namespace
->--include-namespaces
--exclude-namespace
->--exclude-namespaces
PR Checklist
Github Issue
Resolves #178
Notes for your reviewers
README.md
was automatically lintered by IDE, hence newline changes were commited, etc.