pkg/storage/etcd: cut off pkg/api scheme

This commit is contained in:
Dr. Stefan Schimanski 2017-02-01 13:53:43 +01:00 committed by deads2k
parent e4699fca43
commit 6025c228e6
2 changed files with 4 additions and 1 deletions

View File

@ -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,
}, },
} }
} }

View File

@ -44,4 +44,5 @@ type Config struct {
DeserializationCacheSize int DeserializationCacheSize int
Codec runtime.Codec Codec runtime.Codec
Copier runtime.ObjectCopier
} }