From 3371c3cceef40a17864d14f4d4b6e48c7810ba37 Mon Sep 17 00:00:00 2001 From: Alexander Zielenski Date: Thu, 3 Nov 2022 18:59:09 -0700 Subject: [PATCH] use discovery client from factory in explain v2 was making my own which was uncached Kubernetes-commit: dca025f37c7d40388f6869fc3d04b8f4fab8d122 --- pkg/cmd/explain/explain.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/cmd/explain/explain.go b/pkg/cmd/explain/explain.go index 874cc876b..f00548a97 100644 --- a/pkg/cmd/explain/explain.go +++ b/pkg/cmd/explain/explain.go @@ -128,11 +128,11 @@ func (o *ExplainOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args [] // Only openapi v3 needs the discovery client. if o.EnableOpenAPIV3 { - clientset, err := f.KubernetesClientSet() + discoveryClient, err := f.ToDiscoveryClient() if err != nil { return err } - o.DiscoveryClient = clientset.DiscoveryClient + o.DiscoveryClient = discoveryClient } o.args = args