Skip to content

Commit

Permalink
fix: Helm & Go linting
Browse files Browse the repository at this point in the history
  • Loading branch information
doronkg committed Feb 16, 2025
1 parent 5483059 commit 1e92ed7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions charts/kor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ A Kubernetes Helm Chart to discover orphaned resources using kor
| cronJob.image.repository | string | `"yonahdissen/kor"` | |
| cronJob.image.tag | string | `"latest"` | |
| cronJob.name | string | `"kor"` | |
| cronJob.namespaced | string | `nil` | |
| cronJob.namespaced | string | `nil` | Set true/false to explicitly return namespaced/non-namespaced resources |
| cronJob.restartPolicy | string | `"OnFailure"` | |
| cronJob.schedule | string | `"0 1 * * 1"` | |
| cronJob.slackAuthToken | string | `""` | |
Expand All @@ -46,7 +46,7 @@ A Kubernetes Helm Chart to discover orphaned resources using kor
| prometheusExporter.enabled | bool | `true` | |
| prometheusExporter.exporterInterval | string | `""` | |
| prometheusExporter.name | string | `"kor-exporter"` | |
| prometheusExporter.namespaced | string | `nil` | |
| prometheusExporter.namespaced | string | `nil` | Set true/false to explicitly return namespaced/non-namespaced resources |
| prometheusExporter.service.port | int | `8080` | |
| prometheusExporter.service.type | string | `"ClusterIP"` | |
| prometheusExporter.serviceMonitor.enabled | bool | `true` | |
Expand Down
6 changes: 4 additions & 2 deletions charts/kor/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ cronJob:
- kor
args:
- all
namespaced: null # Set true/false to explicitly return namespaced/non-namespaced resources
# -- Set true/false to explicitly return namespaced/non-namespaced resources
namespaced: null
slackWebhookUrl: ""
slackChannel: ""
slackAuthToken: ""
Expand All @@ -27,7 +28,8 @@ prometheusExporter:
- kor
args:
- exporter
namespaced: null # Set true/false to explicitly return namespaced/non-namespaced resources
# -- Set true/false to explicitly return namespaced/non-namespaced resources
namespaced: null
deployment:
image:
repository: yonahdissen/kor
Expand Down
1 change: 0 additions & 1 deletion cmd/kor/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ var exporterCmd = &cobra.Command{
apiExtClient := kor.GetAPIExtensionsClient(kubeconfig)
dynamicClient := kor.GetDynamicClient(kubeconfig)
kor.SetNamespacedFlagState(cmd.Flags().Changed("namespaced"))

kor.Exporter(filterOptions, clientset, apiExtClient, dynamicClient, "json", opts, resourceList)

},
Expand Down
3 changes: 1 addition & 2 deletions pkg/kor/all.go
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,8 @@ func GetUnusedAll(filterOpts *filters.Options, clientset kubernetes.Interface, a
if NamespacedFlagUsed {
if opts.Namespaced {
return GetUnusedAllNamespaced(filterOpts, clientset, outputFormat, opts)
} else {
return GetUnusedAllNonNamespaced(filterOpts, clientset, apiExtClient, dynamicClient, outputFormat, opts)
}
return GetUnusedAllNonNamespaced(filterOpts, clientset, apiExtClient, dynamicClient, outputFormat, opts)

Check failure on line 387 in pkg/kor/all.go

View workflow job for this annotation

GitHub Actions / build

File is not properly formatted (gci)
}

unusedAllNamespaced, err := GetUnusedAllNamespaced(filterOpts, clientset, outputFormat, opts)
Expand Down

0 comments on commit 1e92ed7

Please sign in to comment.