mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 11:13:48 +00:00
change the default storage location to avoid double prefixing
This commit is contained in:
parent
6cb18cae82
commit
bc3434c084
@ -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",
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user