remove unnecessary call to metrics install package

remove init and reference to client-go/api from metrcis install package
This commit is contained in:
Chao Xu 2017-05-05 11:14:37 -07:00
parent 074affca6b
commit b5a41e770a
3 changed files with 0 additions and 14 deletions

View File

@ -26,10 +26,6 @@ import (
"k8s.io/kubernetes/pkg/controller/podautoscaler/metrics"
resourceclient "k8s.io/metrics/pkg/client/clientset_generated/clientset/typed/metrics/v1alpha1"
"k8s.io/metrics/pkg/client/custom_metrics"
// install the APIs so that they're registered with the scheme for the clients
_ "k8s.io/metrics/pkg/apis/custom_metrics/install"
_ "k8s.io/metrics/pkg/apis/metrics/install"
)
func startHPAController(ctx ControllerContext) (bool, error) {

View File

@ -22,15 +22,10 @@ import (
"k8s.io/apimachinery/pkg/apimachinery/announced"
"k8s.io/apimachinery/pkg/apimachinery/registered"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/pkg/api"
"k8s.io/metrics/pkg/apis/custom_metrics"
"k8s.io/metrics/pkg/apis/custom_metrics/v1alpha1"
)
func init() {
Install(api.GroupFactoryRegistry, api.Registry, api.Scheme)
}
// Install registers the API group and adds types to a scheme
func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
if err := announced.NewGroupMetaFactory(

View File

@ -23,15 +23,10 @@ import (
"k8s.io/apimachinery/pkg/apimachinery/registered"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/sets"
"k8s.io/client-go/pkg/api"
"k8s.io/metrics/pkg/apis/metrics"
"k8s.io/metrics/pkg/apis/metrics/v1alpha1"
)
func init() {
Install(api.GroupFactoryRegistry, api.Registry, api.Scheme)
}
// Install registers the API group and adds types to a scheme
func Install(groupFactoryRegistry announced.APIGroupFactoryRegistry, registry *registered.APIRegistrationManager, scheme *runtime.Scheme) {
if err := announced.NewGroupMetaFactory(