mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-12 20:57:20 +00:00
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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user