Skip to content

Commit

Permalink
fix: Use correct cron job kind when discovering API versions (#1554)
Browse files Browse the repository at this point in the history
* fix: Use correct cron job kind when discovering API versions

* Fix failing e2e test
  • Loading branch information
banjoh authored May 31, 2024
1 parent 91da8f1 commit ce15527
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/collect/cluster_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ func jobs(ctx context.Context, client *kubernetes.Clientset, namespaces []string
}

func cronJobs(ctx context.Context, client *kubernetes.Clientset, namespaces []string) (map[string][]byte, map[string]string) {
ok, err := discovery.HasResource(client, "batch/v1", "CronJobs")
ok, err := discovery.HasResource(client, "batch/v1", "CronJob")
if err != nil {
return nil, map[string]string{"": err.Error()}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/support-bundle/cluster_resources_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ func TestClusterResources(t *testing.T) {
"pvs.json",
"pod-disruption-budgets-errors.json",
"resources.json",
"cronjobs-errors.json",
"custom-resource-definitions.json",
"groups.json",
"priorityclasses.json",
Expand All @@ -38,6 +37,7 @@ func TestClusterResources(t *testing.T) {
},
{
paths: []string{
"cronjobs",
"limitranges",
"daemonsets",
"deployments",
Expand Down

0 comments on commit ce15527

Please sign in to comment.