Remove DiscoveryClient from diff command

This PR removes `DiscoveryClient` field in diff command. Because
it is not used anywhere in diff command.

Kubernetes-commit: 5fdf97ad8e3a9b7a16479a5ec4ebff3d38c55a18
This commit is contained in:
Arda Güçlü 2022-03-08 09:59:49 +03:00 committed by Kubernetes Publisher
parent 624757ff38
commit 1474736be3
1 changed files with 0 additions and 7 deletions

View File

@ -35,7 +35,6 @@ import (
"k8s.io/apimachinery/pkg/types"
"k8s.io/cli-runtime/pkg/genericclioptions"
"k8s.io/cli-runtime/pkg/resource"
"k8s.io/client-go/discovery"
"k8s.io/client-go/dynamic"
"k8s.io/klog/v2"
"k8s.io/kubectl/pkg/cmd/apply"
@ -110,7 +109,6 @@ type DiffOptions struct {
Selector string
OpenAPISchema openapi.Resources
DiscoveryClient discovery.DiscoveryInterface
DynamicClient dynamic.Interface
DryRunVerifier *resource.QueryParamVerifier
CmdNamespace string
@ -629,11 +627,6 @@ func (o *DiffOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) error {
}
}
o.DiscoveryClient, err = f.ToDiscoveryClient()
if err != nil {
return err
}
o.DynamicClient, err = f.DynamicClient()
if err != nil {
return err