mirror of
https://github.com/k8snetworkplumbingwg/multus-cni.git
synced 2025-09-04 10:27:57 +00:00
improvement: Limit bootstrap pod list when building k8s client
This commit is contained in:
@@ -96,7 +96,7 @@ func PerNodeK8sClient(nodeName, bootstrapKubeconfigFile string, certDuration tim
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
logging.Errorf("failed to read kubeconfig from cert manager: %v", err)
|
logging.Errorf("failed to read kubeconfig from cert manager: %v", err)
|
||||||
} else {
|
} 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
|
// tls unknown authority error is unrecoverable error with retry
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if strings.Contains(err.Error(), "x509: certificate signed by unknown authority") {
|
if strings.Contains(err.Error(), "x509: certificate signed by unknown authority") {
|
||||||
|
Reference in New Issue
Block a user