yonahd / kor

A Golang Tool to discover unused Kubernetes Resources
MIT License
974 stars 91 forks source link

Failed to run on OpenShift 4.x #213

Closed hrytsai closed 7 months ago

hrytsai commented 7 months ago

Describe the bug When run kor with parameters kor all -n kor-test-namespace we got an error

Failed to retrieve namespaces: namespaces is forbidden: User "kor-test-user" cannot list resource "namespaces" in API group "" at the cluster scope

To Reproduce Run kor with option "-n "

Expected behavior Namespace will be scanned and result provided

Screenshots If applicable, add screenshots to help explain your problem.

OS version, architecture and kor version e.g. Windows 10 x86_64 Kor version: v0.3.5

Additional context OpenShift doesn't allow user to get list of namespaces. For example: kubectl get ns will return

Error from server (Forbidden): namespaces is forbidden: User "kor-test-user" cannot list resource "namespaces" in API group "" at the cluster scope

but when you run: kubectl get project you will get result:

NAME DISPLAY NAME STATUS ... kor-test-namespace ...

yonahd commented 7 months ago

Thanks for opening this issue. It seems to be a regression which we'll address.

hrytsai commented 7 months ago

Great job Thank you for fast response, will be waiting for new release to test it

yonahd commented 7 months ago

@hrytsai a new release was published. Can you please give it a try?

If you have any issues or further feedback please feel free to open another issue here or in our discord

hrytsai commented 7 months ago

The problem was fixed in v0.3.6 Thank you