Replace automatic YAML decoding with opt-in YAML decoding

Base codecs no longer automically handle YAML.  Instead, clients
must convert to JSON first via yaml.ToJSON and runtime.YAMLDecoder.
This commit is contained in:
Clayton Coleman
2015-03-16 23:43:59 -04:00
parent 71abc99dbe
commit 6918a4d32e
7 changed files with 49 additions and 40 deletions

View File

@@ -18,6 +18,7 @@ package latest
import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/client/clientcmd/api/v1"
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
)
// Version is the string that represents the current external default version.
@@ -37,4 +38,4 @@ var Versions = []string{"v1"}
// the latest supported version. Use this Codec when writing to
// disk, a data store that is not dynamically versioned, or in tests.
// This codec can decode any object that Kubernetes is aware of.
var Codec = v1.Codec
var Codec = runtime.YAMLDecoder(v1.Codec)