pkg/storage/etcd: cut off pkg/api scheme
This commit is contained in:
parent
e4699fca43
commit
6025c228e6
|
|
@ -21,6 +21,7 @@ import (
|
||||||
|
|
||||||
"github.com/spf13/pflag"
|
"github.com/spf13/pflag"
|
||||||
|
|
||||||
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
"k8s.io/apiserver/pkg/storage/storagebackend"
|
"k8s.io/apiserver/pkg/storage/storagebackend"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -34,13 +35,14 @@ type EtcdOptions struct {
|
||||||
EtcdServersOverrides []string
|
EtcdServersOverrides []string
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewEtcdOptions() *EtcdOptions {
|
func NewEtcdOptions(scheme *runtime.Scheme) *EtcdOptions {
|
||||||
return &EtcdOptions{
|
return &EtcdOptions{
|
||||||
StorageConfig: storagebackend.Config{
|
StorageConfig: storagebackend.Config{
|
||||||
Prefix: DefaultEtcdPathPrefix,
|
Prefix: DefaultEtcdPathPrefix,
|
||||||
// Default cache size to 0 - if unset, its size will be set based on target
|
// Default cache size to 0 - if unset, its size will be set based on target
|
||||||
// memory usage.
|
// memory usage.
|
||||||
DeserializationCacheSize: 0,
|
DeserializationCacheSize: 0,
|
||||||
|
Copier: scheme,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,4 +44,5 @@ type Config struct {
|
||||||
DeserializationCacheSize int
|
DeserializationCacheSize int
|
||||||
|
|
||||||
Codec runtime.Codec
|
Codec runtime.Codec
|
||||||
|
Copier runtime.ObjectCopier
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue