remove metrics client factory method

This commit is contained in:
David Eads
2018-02-21 11:01:09 -05:00
parent c153aff99f
commit f084311326
11 changed files with 145 additions and 136 deletions

View File

@@ -131,7 +131,12 @@ func (o *TopNodeOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []
}
o.DiscoveryClient = clientset.DiscoveryClient
o.MetricsClient, err = f.MetricsClientSet()
config, err := f.ClientConfig()
if err != nil {
return err
}
o.MetricsClient, err = metricsclientset.NewForConfig(config)
if err != nil {
return err
}