From 161dfbaa1fee0b5a53ac79af162c4a646fca7396 Mon Sep 17 00:00:00 2001 From: Aditya Thebe Date: Thu, 12 Dec 2024 15:46:22 +0545 Subject: [PATCH] fix: lint errors --- scrapers/kubernetes/kubernetes_file.go | 2 +- utils/kube/fetcher.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scrapers/kubernetes/kubernetes_file.go b/scrapers/kubernetes/kubernetes_file.go index 333a1a65..38296a9d 100644 --- a/scrapers/kubernetes/kubernetes_file.go +++ b/scrapers/kubernetes/kubernetes_file.go @@ -207,7 +207,7 @@ func (kubernetes KubernetesFileScraper) Scrape(ctx api.ScrapeContext) v1.ScrapeR for _, pod := range pods { for _, file := range pod.Config.Files { for _, p := range file.Path { - stdout, _, err := ctx.KubernetesDynamicClient().ExecutePodf(ctx, pod.Namespace, pod.Name, pod.Container, "cat", p) + stdout, _, err := ctx.KubernetesClient().ExecutePodf(ctx, pod.Namespace, pod.Name, pod.Container, "cat", p) if err != nil { results.Errorf(err, "Failed to fetch %s/%s/%s: %v", pod.Namespace, pod.Name, pod.Container, p) continue diff --git a/utils/kube/fetcher.go b/utils/kube/fetcher.go index cfa9185f..e74b4acb 100644 --- a/utils/kube/fetcher.go +++ b/utils/kube/fetcher.go @@ -57,7 +57,7 @@ func FetchInvolvedObjects(ctx api.ScrapeContext, iObjs []v1.InvolvedObject) ([]* client, ok := clientMap[gvk] if !ok { - c, err := ctx.KubernetesDynamicClient().GetClientByGroupVersionKind(gvk.Group, gvk.Version, gvk.Kind) + c, err := ctx.KubernetesClient().GetClientByGroupVersionKind(gvk.Group, gvk.Version, gvk.Kind) if err != nil { // We suspect if this happens we might be on the wrong k8s context