diff --git a/pkg/kor/exporter.go b/pkg/kor/exporter.go index 7d0a2e8b..f08b8512 100644 --- a/pkg/kor/exporter.go +++ b/pkg/kor/exporter.go @@ -49,7 +49,8 @@ func exportMetrics(includeExcludeLists IncludeExcludeLists, filterOptions *Filte } for { - if korOutput, err := GetUnusedAll(includeExcludeLists, filterOptions, clientset, outputFormat, opts); err != nil { + fmt.Println("collecting unused resources") + if korOutput, err := GetUnusedConfigmaps(includeExcludeLists, filterOptions, clientset, outputFormat, opts); err != nil { fmt.Println(err) os.Exit(1) } else { @@ -59,6 +60,8 @@ func exportMetrics(includeExcludeLists IncludeExcludeLists, filterOptions *Filte return } + orphanedResourcesCounter.Reset() + for namespace, resources := range data { for kind, resourceList := range resources { for _, resourceName := range resourceList {