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
This commit is contained in:
Evans Mungai
2024-05-31 07:23:56 +01:00
committed by GitHub
parent 91da8f13bb
commit 84ece0b778
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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()}
}
@@ -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",
@@ -38,6 +37,7 @@ func TestClusterResources(t *testing.T) {
},
{
paths: []string{
"cronjobs",
"limitranges",
"daemonsets",
"deployments",