From 2fa05dea32806595a2a687b89d6abe1915c33842 Mon Sep 17 00:00:00 2001 From: Gerard Nguyen Date: Thu, 8 Feb 2024 13:27:58 +1100 Subject: [PATCH] update correct K8S API group for batch and policy --- pkg/collect/cluster_resources.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/collect/cluster_resources.go b/pkg/collect/cluster_resources.go index 28cb8ab3a..e4134fe3b 100644 --- a/pkg/collect/cluster_resources.go +++ b/pkg/collect/cluster_resources.go @@ -506,7 +506,7 @@ func pods(ctx context.Context, client *kubernetes.Clientset, namespaces []string } func getPodDisruptionBudgets(ctx context.Context, client *kubernetes.Clientset, namespaces []string) (map[string][]byte, map[string]string) { - ok, err := discovery.HasResource(client, "policy.k8s.io/v1", "PodDisruptionBudgets") + ok, err := discovery.HasResource(client, "policy/v1", "PodDisruptionBudgets") if err != nil { return nil, map[string]string{"": err.Error()} } @@ -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.k8s.io/v1", "CronJobs") + ok, err := discovery.HasResource(client, "batch/v1", "CronJobs") if err != nil { return nil, map[string]string{"": err.Error()} }