yonahd / kor

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

kor all -n displays non namespaced resources #178

Closed cmk-jarek closed 6 months ago

cmk-jarek commented 11 months ago

Describe the bug kor all -n displays non namespaced resources

To Reproduce Steps to reproduce the behavior: "have non namspaced orphaned recources like CRD's in your cluster" kor all -n default

Expected behavior when i specify explicit Namespaces, i want to ONLY have the resources in those namespaces evaluated.

Screenshots wouldnt help as the issue seems clear

OS version, architecture and kor version Linux x86_64 Kor version: 0.3.2

yonahd commented 11 months ago

We'll take this as a bug. I think we'll change the default behavior to be only namespaced resources and put the non namespaced resources behind a flag

cmk-jarek commented 11 months ago

Thank you. Already glimpsed into the code and wanted to send a pr, but as the year nears its end im kinda busy. lets see who comes first! :)

arielsashcov commented 8 months ago

Hey I can take this

doronkg commented 8 months ago

@arielsashcov note that GetUnusedAll() now calls both GetUnusedAllNamespaced() & GetUnusedAllNonNamespaced() so the new separation might aid you resolving this issue (see #216, #227).

doronkg commented 6 months ago

/assign WIP in #258