change the default storage location to avoid double prefixing

This commit is contained in:
deads2k 2017-06-06 13:28:08 -04:00
parent 6cb18cae82
commit bc3434c084
2 changed files with 3 additions and 3 deletions

View File

@ -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"), etcdPath: "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",
@ -407,7 +407,7 @@ func TestEtcdStorage(t *testing.T) {
}, },
"clusteredCurletDefinition": { "clusteredCurletDefinition": {
etcdPath: path.Join("/", etcdPrefix, "apiextensions.k8s.io/customresourcedefinitions/curlets.mygroup.example.com"), etcdPath: "apiextensions.k8s.io/customresourcedefinitions/curlets.mygroup.example.com",
expectedObject: &metaObject{ expectedObject: &metaObject{
Kind: "CustomResourceDefinition", Kind: "CustomResourceDefinition",
APIVersion: "apiextensions.k8s.io/v1beta1", APIVersion: "apiextensions.k8s.io/v1beta1",

View File

@ -135,7 +135,7 @@ func (f *SimpleRestOptionsFactory) GetRESTOptions(resource schema.GroupResource)
Decorator: generic.UndecoratedStorage, Decorator: generic.UndecoratedStorage,
EnableGarbageCollection: f.Options.EnableGarbageCollection, EnableGarbageCollection: f.Options.EnableGarbageCollection,
DeleteCollectionWorkers: f.Options.DeleteCollectionWorkers, DeleteCollectionWorkers: f.Options.DeleteCollectionWorkers,
ResourcePrefix: f.Options.StorageConfig.Prefix + "/" + resource.Group + "/" + resource.Resource, ResourcePrefix: resource.Group + "/" + resource.Resource,
} }
if f.Options.EnableWatchCache { if f.Options.EnableWatchCache {
ret.Decorator = genericregistry.StorageWithCacher(f.Options.DefaultWatchCacheSize) ret.Decorator = genericregistry.StorageWithCacher(f.Options.DefaultWatchCacheSize)