Skip to content

Commit 772d867

Browse files
authored
update correct K8S API group for batch and policy (#1461)
1 parent 5daf6d6 commit 772d867

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/collect/cluster_resources.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ func pods(ctx context.Context, client *kubernetes.Clientset, namespaces []string
506506
}
507507

508508
func getPodDisruptionBudgets(ctx context.Context, client *kubernetes.Clientset, namespaces []string) (map[string][]byte, map[string]string) {
509-
ok, err := discovery.HasResource(client, "policy.k8s.io/v1", "PodDisruptionBudgets")
509+
ok, err := discovery.HasResource(client, "policy/v1", "PodDisruptionBudgets")
510510
if err != nil {
511511
return nil, map[string]string{"": err.Error()}
512512
}
@@ -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.k8s.io/v1", "CronJobs")
804+
ok, err := discovery.HasResource(client, "batch/v1", "CronJobs")
805805
if err != nil {
806806
return nil, map[string]string{"": err.Error()}
807807
}

0 commit comments

Comments
 (0)