Merge pull request #39814 from deads2k/api-58-multi-register

Automatic merge from submit-queue

replace global registry in apimachinery with global registry in k8s.io/kubernetes

We'd like to remove all globals, but our immediate problem is that a shared registry between k8s.io/kubernetes and k8s.io/client-go doesn't work.  Since client-go makes a copy, we can actually keep a global registry with other globals in pkg/api for now.

@kubernetes/sig-api-machinery-misc @lavalamp @smarterclayton @sttts
This commit is contained in:
Kubernetes Submit Queue
2017-01-13 12:37:02 -08:00
committed by GitHub
336 changed files with 610 additions and 889 deletions

View File

@@ -49,7 +49,6 @@ import (
. "github.com/onsi/gomega"
gomegatypes "github.com/onsi/gomega/types"
"k8s.io/apimachinery/pkg/apimachinery/registered"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/labels"
@@ -2380,7 +2379,7 @@ func isNodeUntainted(node *v1.Node) bool {
fakePod := &v1.Pod{
TypeMeta: metav1.TypeMeta{
Kind: "Pod",
APIVersion: registered.GroupOrDie(v1.GroupName).GroupVersion.String(),
APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(),
},
ObjectMeta: v1.ObjectMeta{
Name: "fake-not-scheduled",
@@ -5259,7 +5258,7 @@ func RcByNameContainer(name string, replicas int32, image string, labels map[str
return &v1.ReplicationController{
TypeMeta: metav1.TypeMeta{
Kind: "ReplicationController",
APIVersion: registered.GroupOrDie(v1.GroupName).GroupVersion.String(),
APIVersion: api.Registry.GroupOrDie(v1.GroupName).GroupVersion.String(),
},
ObjectMeta: v1.ObjectMeta{
Name: name,