mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
use discovery client from factory in explain v2
was making my own which was uncached
This commit is contained in:
parent
a82015b4a2
commit
dca025f37c
@ -128,11 +128,11 @@ func (o *ExplainOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []
|
|||||||
|
|
||||||
// Only openapi v3 needs the discovery client.
|
// Only openapi v3 needs the discovery client.
|
||||||
if o.EnableOpenAPIV3 {
|
if o.EnableOpenAPIV3 {
|
||||||
clientset, err := f.KubernetesClientSet()
|
discoveryClient, err := f.ToDiscoveryClient()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
o.DiscoveryClient = clientset.DiscoveryClient
|
o.DiscoveryClient = discoveryClient
|
||||||
}
|
}
|
||||||
|
|
||||||
o.args = args
|
o.args = args
|
||||||
|
Loading…
Reference in New Issue
Block a user