Commit 3e3133bc authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #41781 from wojtek-t/dont_use_base64_encoding_with-etcd3

Automatic merge from submit-queue (batch tested with PRs 41797, 41793, 41795, 41807, 41781) Don't use base64 encoding with etcd v3 In https://github.com/kubernetes/kubernetes/pull/36229 we changed the default storage to etcd v3. This in fact is a fix to that PR. With etcd v3, the base64-encoding is no longer needed - so we use it only if etcd v2 is explicitly requested as storage format. @lavalamp
parents 8fc311c9 ce37b187
...@@ -56,7 +56,7 @@ func NewStorageCodec(opts StorageCodecConfig) (runtime.Codec, error) { ...@@ -56,7 +56,7 @@ func NewStorageCodec(opts StorageCodecConfig) (runtime.Codec, error) {
// etcd2 only supports string data - we must wrap any result before returning // etcd2 only supports string data - we must wrap any result before returning
// TODO: storagebackend should return a boolean indicating whether it supports binary data // TODO: storagebackend should return a boolean indicating whether it supports binary data
if !serializer.EncodesAsText && (opts.Config.Type == storagebackend.StorageTypeUnset || opts.Config.Type == storagebackend.StorageTypeETCD2) { if !serializer.EncodesAsText && opts.Config.Type == storagebackend.StorageTypeETCD2 {
glog.V(4).Infof("Wrapping the underlying binary storage serializer with a base64 encoding for etcd2") glog.V(4).Infof("Wrapping the underlying binary storage serializer with a base64 encoding for etcd2")
s = runtime.NewBase64Serializer(s) s = runtime.NewBase64Serializer(s)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment