Merge pull request #108580 from ardaguclu/remove-diff-discovery

Remove DiscoveryClient from diff command
This commit is contained in:
Kubernetes Prow Robot 2022-03-23 22:31:17 -07:00 committed by GitHub
commit 9a253ed042
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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