Closed Yuni-sa closed 6 months ago
looks like it basically creates two parent json objects: one for namespaced resources and one for non namespaced, while the kor exporter can only parse a single parent object, the objects are added together by using a simple string concatenation with the "+" operator. https://github.com/yonahd/kor/blob/4a79f02b361557d9363e02212f1fbddbef2e0e03/pkg/kor/all.go#L319
Good catch @Yuni-sa! Must've missed the JSON concatenation in #216 when refactored the GetUnusedAll()
function.
I'd like to resolve it.
/assign
WIP in #227.
Describe the bug kor exporter cannot parse json:
json output:
To Reproduce run
kor exporter
orkor all -o json
after #216 ,also happens with-n namepsace
Expected behavior
OS version, architecture and kor version Darwin x86_64 Kor version: 3.6.0 after #216 got merged.
Additional context seems like a problem when creating the JSON for namespaced and non namespaced resources with the new
GetUnusedAll()
which means we also get it when just running kor all -o json. multi seems to work fine: