Merge pull request #108580 from ardaguclu/remove-diff-discovery
Remove DiscoveryClient from diff command
This commit is contained in:
		@@ -35,7 +35,6 @@ import (
 | 
				
			|||||||
	"k8s.io/apimachinery/pkg/types"
 | 
						"k8s.io/apimachinery/pkg/types"
 | 
				
			||||||
	"k8s.io/cli-runtime/pkg/genericclioptions"
 | 
						"k8s.io/cli-runtime/pkg/genericclioptions"
 | 
				
			||||||
	"k8s.io/cli-runtime/pkg/resource"
 | 
						"k8s.io/cli-runtime/pkg/resource"
 | 
				
			||||||
	"k8s.io/client-go/discovery"
 | 
					 | 
				
			||||||
	"k8s.io/client-go/dynamic"
 | 
						"k8s.io/client-go/dynamic"
 | 
				
			||||||
	"k8s.io/klog/v2"
 | 
						"k8s.io/klog/v2"
 | 
				
			||||||
	"k8s.io/kubectl/pkg/cmd/apply"
 | 
						"k8s.io/kubectl/pkg/cmd/apply"
 | 
				
			||||||
@@ -110,7 +109,6 @@ type DiffOptions struct {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	Selector         string
 | 
						Selector         string
 | 
				
			||||||
	OpenAPISchema    openapi.Resources
 | 
						OpenAPISchema    openapi.Resources
 | 
				
			||||||
	DiscoveryClient  discovery.DiscoveryInterface
 | 
					 | 
				
			||||||
	DynamicClient    dynamic.Interface
 | 
						DynamicClient    dynamic.Interface
 | 
				
			||||||
	DryRunVerifier   *resource.QueryParamVerifier
 | 
						DryRunVerifier   *resource.QueryParamVerifier
 | 
				
			||||||
	CmdNamespace     string
 | 
						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()
 | 
						o.DynamicClient, err = f.DynamicClient()
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return err
 | 
							return err
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user