mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-10-25 10:00:53 +00:00
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:
@@ -33,7 +33,6 @@ import (
|
||||
|
||||
"github.com/ghodss/yaml"
|
||||
|
||||
"k8s.io/apimachinery/pkg/apimachinery/registered"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/util/wait"
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
@@ -279,7 +278,7 @@ func TestMasterService(t *testing.T) {
|
||||
_, s := framework.RunAMaster(framework.NewIntegrationTestMasterConfig())
|
||||
defer s.Close()
|
||||
|
||||
client := clientset.NewForConfigOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: ®istered.GroupOrDie(api.GroupName).GroupVersion}})
|
||||
client := clientset.NewForConfigOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: &api.Registry.GroupOrDie(api.GroupName).GroupVersion}})
|
||||
|
||||
err := wait.Poll(time.Second, time.Minute, func() (bool, error) {
|
||||
svcList, err := client.Core().Services(api.NamespaceDefault).List(api.ListOptions{})
|
||||
@@ -321,7 +320,7 @@ func TestServiceAlloc(t *testing.T) {
|
||||
_, s := framework.RunAMaster(cfg)
|
||||
defer s.Close()
|
||||
|
||||
client := clientset.NewForConfigOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: ®istered.GroupOrDie(api.GroupName).GroupVersion}})
|
||||
client := clientset.NewForConfigOrDie(&restclient.Config{Host: s.URL, ContentConfig: restclient.ContentConfig{GroupVersion: &api.Registry.GroupOrDie(api.GroupName).GroupVersion}})
|
||||
|
||||
svc := func(i int) *api.Service {
|
||||
return &api.Service{
|
||||
|
||||
Reference in New Issue
Block a user