Skip to content

Commit ce15527

Browse files
authored
fix: Use correct cron job kind when discovering API versions (#1554)
* fix: Use correct cron job kind when discovering API versions * Fix failing e2e test
1 parent 91da8f1 commit ce15527

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/collect/cluster_resources.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ func jobs(ctx context.Context, client *kubernetes.Clientset, namespaces []string
801801
}
802802

803803
func cronJobs(ctx context.Context, client *kubernetes.Clientset, namespaces []string) (map[string][]byte, map[string]string) {
804-
ok, err := discovery.HasResource(client, "batch/v1", "CronJobs")
804+
ok, err := discovery.HasResource(client, "batch/v1", "CronJob")
805805
if err != nil {
806806
return nil, map[string]string{"": err.Error()}
807807
}

test/e2e/support-bundle/cluster_resources_e2e_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ func TestClusterResources(t *testing.T) {
2626
"pvs.json",
2727
"pod-disruption-budgets-errors.json",
2828
"resources.json",
29-
"cronjobs-errors.json",
3029
"custom-resource-definitions.json",
3130
"groups.json",
3231
"priorityclasses.json",
@@ -38,6 +37,7 @@ func TestClusterResources(t *testing.T) {
3837
},
3938
{
4039
paths: []string{
40+
"cronjobs",
4141
"limitranges",
4242
"daemonsets",
4343
"deployments",

0 commit comments

Comments
 (0)