mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 05:36:12 +00:00
remove extra prefix from CRs
This commit is contained in:
@@ -401,7 +401,7 @@ func (t CRDRESTOptionsGetter) GetRESTOptions(resource schema.GroupResource) (gen
|
||||
Decorator: generic.UndecoratedStorage,
|
||||
EnableGarbageCollection: t.EnableGarbageCollection,
|
||||
DeleteCollectionWorkers: t.DeleteCollectionWorkers,
|
||||
ResourcePrefix: t.StoragePrefix + "/" + resource.Group + "/" + resource.Resource,
|
||||
ResourcePrefix: resource.Group + "/" + resource.Resource,
|
||||
}
|
||||
if t.EnableWatchCache {
|
||||
ret.Decorator = genericregistry.StorageWithCacher(t.DefaultWatchCacheSize)
|
||||
|
@@ -382,7 +382,7 @@ func TestEtcdStorage(t *testing.T) {
|
||||
expectedObject *metaObject
|
||||
}{
|
||||
"namespacedNoxuDefinition": {
|
||||
etcdPath: path.Join("/", etcdPrefix, "apiextensions.k8s.io/customresourcedefinitions/noxus.mygroup.example.com"), // TODO: Double check this, no namespace?
|
||||
etcdPath: path.Join("/", etcdPrefix, "apiextensions.k8s.io/customresourcedefinitions/noxus.mygroup.example.com"),
|
||||
expectedObject: &metaObject{
|
||||
Kind: "CustomResourceDefinition",
|
||||
APIVersion: "apiextensions.k8s.io/v1beta1",
|
||||
@@ -394,7 +394,7 @@ func TestEtcdStorage(t *testing.T) {
|
||||
},
|
||||
},
|
||||
"namespacedNoxuInstance": {
|
||||
etcdPath: path.Join("/", etcdPrefix, "mygroup.example.com/noxus/the-cruel-default/foo"),
|
||||
etcdPath: "mygroup.example.com/noxus/the-cruel-default/foo",
|
||||
expectedObject: &metaObject{
|
||||
Kind: "WishIHadChosenNoxu",
|
||||
APIVersion: "mygroup.example.com/v1beta1",
|
||||
@@ -420,7 +420,7 @@ func TestEtcdStorage(t *testing.T) {
|
||||
},
|
||||
|
||||
"clusteredCurletInstance": {
|
||||
etcdPath: path.Join("/", etcdPrefix, "mygroup.example.com/curlets/bar"),
|
||||
etcdPath: "mygroup.example.com/curlets/bar",
|
||||
expectedObject: &metaObject{
|
||||
Kind: "Curlet",
|
||||
APIVersion: "mygroup.example.com/v1beta1",
|
||||
|
Reference in New Issue
Block a user