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"
|
||||
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
"k8s.io/apiserver/pkg/storage/storagebackend"
|
||||
)
|
||||
|
||||
|
|
@ -34,13 +35,14 @@ type EtcdOptions struct {
|
|||
EtcdServersOverrides []string
|
||||
}
|
||||
|
||||
func NewEtcdOptions() *EtcdOptions {
|
||||
func NewEtcdOptions(scheme *runtime.Scheme) *EtcdOptions {
|
||||
return &EtcdOptions{
|
||||
StorageConfig: storagebackend.Config{
|
||||
Prefix: DefaultEtcdPathPrefix,
|
||||
// Default cache size to 0 - if unset, its size will be set based on target
|
||||
// memory usage.
|
||||
DeserializationCacheSize: 0,
|
||||
Copier: scheme,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,4 +44,5 @@ type Config struct {
|
|||
DeserializationCacheSize int
|
||||
|
||||
Codec runtime.Codec
|
||||
Copier runtime.ObjectCopier
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue