mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 21:53:52 +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,
|
Decorator: generic.UndecoratedStorage,
|
||||||
EnableGarbageCollection: t.EnableGarbageCollection,
|
EnableGarbageCollection: t.EnableGarbageCollection,
|
||||||
DeleteCollectionWorkers: t.DeleteCollectionWorkers,
|
DeleteCollectionWorkers: t.DeleteCollectionWorkers,
|
||||||
ResourcePrefix: t.StoragePrefix + "/" + resource.Group + "/" + resource.Resource,
|
ResourcePrefix: resource.Group + "/" + resource.Resource,
|
||||||
}
|
}
|
||||||
if t.EnableWatchCache {
|
if t.EnableWatchCache {
|
||||||
ret.Decorator = genericregistry.StorageWithCacher(t.DefaultWatchCacheSize)
|
ret.Decorator = genericregistry.StorageWithCacher(t.DefaultWatchCacheSize)
|
||||||
|
@@ -382,7 +382,7 @@ func TestEtcdStorage(t *testing.T) {
|
|||||||
expectedObject *metaObject
|
expectedObject *metaObject
|
||||||
}{
|
}{
|
||||||
"namespacedNoxuDefinition": {
|
"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{
|
expectedObject: &metaObject{
|
||||||
Kind: "CustomResourceDefinition",
|
Kind: "CustomResourceDefinition",
|
||||||
APIVersion: "apiextensions.k8s.io/v1beta1",
|
APIVersion: "apiextensions.k8s.io/v1beta1",
|
||||||
@@ -394,7 +394,7 @@ func TestEtcdStorage(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
"namespacedNoxuInstance": {
|
"namespacedNoxuInstance": {
|
||||||
etcdPath: path.Join("/", etcdPrefix, "mygroup.example.com/noxus/the-cruel-default/foo"),
|
etcdPath: "mygroup.example.com/noxus/the-cruel-default/foo",
|
||||||
expectedObject: &metaObject{
|
expectedObject: &metaObject{
|
||||||
Kind: "WishIHadChosenNoxu",
|
Kind: "WishIHadChosenNoxu",
|
||||||
APIVersion: "mygroup.example.com/v1beta1",
|
APIVersion: "mygroup.example.com/v1beta1",
|
||||||
@@ -420,7 +420,7 @@ func TestEtcdStorage(t *testing.T) {
|
|||||||
},
|
},
|
||||||
|
|
||||||
"clusteredCurletInstance": {
|
"clusteredCurletInstance": {
|
||||||
etcdPath: path.Join("/", etcdPrefix, "mygroup.example.com/curlets/bar"),
|
etcdPath: "mygroup.example.com/curlets/bar",
|
||||||
expectedObject: &metaObject{
|
expectedObject: &metaObject{
|
||||||
Kind: "Curlet",
|
Kind: "Curlet",
|
||||||
APIVersion: "mygroup.example.com/v1beta1",
|
APIVersion: "mygroup.example.com/v1beta1",
|
||||||
|
Reference in New Issue
Block a user