Skip to content

Commit

Permalink
update correct K8S API group for batch and policy (#1461)
Browse files Browse the repository at this point in the history
  • Loading branch information
nvanthao authored Feb 8, 2024
1 parent 5daf6d6 commit 772d867
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/collect/cluster_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()}
}
Expand Down 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.k8s.io/v1", "CronJobs")
ok, err := discovery.HasResource(client, "batch/v1", "CronJobs")
if err != nil {
return nil, map[string]string{"": err.Error()}
}
Expand Down

0 comments on commit 772d867

Please sign in to comment.