File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import (
2828 "github.com/spf13/pflag"
2929 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3030 "k8s.io/cli-runtime/pkg/genericclioptions"
31+ "k8s.io/client-go/discovery"
3132 "k8s.io/client-go/dynamic"
3233 _ "k8s.io/client-go/plugin/pkg/client/auth" // combined authprovider import
3334 "k8s.io/client-go/rest"
@@ -108,9 +109,9 @@ func run(command *cobra.Command, args []string) error {
108109 if err != nil {
109110 return fmt .Errorf ("failed to construct dynamic client: %w" , err )
110111 }
111- dc , err := cf . ToDiscoveryClient ( )
112+ dc , err := discovery . NewDiscoveryClientForConfig ( restConfig )
112113 if err != nil {
113- return err
114+ return fmt . Errorf ( "failed to construct discovery client: %w" , err )
114115 }
115116
116117 apis , err := findAPIs (dc )
You can’t perform that action at this time.
0 commit comments