From f874a03f363b63cdba2432fc2460e21eecbccea4 Mon Sep 17 00:00:00 2001 From: George Campbell Date: Tue, 24 Jun 2025 19:52:37 +0100 Subject: [PATCH] improvement: Limit bootstrap pod list when building k8s client --- pkg/k8sclient/kubeconfig.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/k8sclient/kubeconfig.go b/pkg/k8sclient/kubeconfig.go index b9ca1b402..9969fcdac 100644 --- a/pkg/k8sclient/kubeconfig.go +++ b/pkg/k8sclient/kubeconfig.go @@ -96,7 +96,7 @@ func PerNodeK8sClient(nodeName, bootstrapKubeconfigFile string, certDuration tim if err != nil { logging.Errorf("failed to read kubeconfig from cert manager: %v", err) } else { - _, err := tempClient.CoreV1().Pods("").List(context.TODO(), metav1.ListOptions{}) + _, err := tempClient.CoreV1().Pods("default").List(context.TODO(), metav1.ListOptions{}) // tls unknown authority error is unrecoverable error with retry if err != nil { if strings.Contains(err.Error(), "x509: certificate signed by unknown authority") {