diff --git a/pkg/oc/cli/cmd/set/env.go b/pkg/oc/cli/cmd/set/env.go index 2e2db37439f9..058c55f4d61e 100644 --- a/pkg/oc/cli/cmd/set/env.go +++ b/pkg/oc/cli/cmd/set/env.go @@ -227,6 +227,7 @@ func (o *EnvOptions) RunEnv(f *clientcmd.Factory) error { if len(o.From) != 0 { b := f.NewBuilder(). + Internal(). LocalParam(o.Local). ContinueOnError(). NamespaceParam(cmdNamespace).DefaultNamespace(). @@ -290,6 +291,7 @@ func (o *EnvOptions) RunEnv(f *clientcmd.Factory) error { } b := f.NewBuilder(). + Internal(). LocalParam(o.Local). ContinueOnError(). NamespaceParam(cmdNamespace).DefaultNamespace(). diff --git a/pkg/oc/experimental/config/patch.go b/pkg/oc/experimental/config/patch.go index 1c50e2415c33..4c9a31af8f04 100644 --- a/pkg/oc/experimental/config/patch.go +++ b/pkg/oc/experimental/config/patch.go @@ -67,6 +67,7 @@ func NewCmdPatch(name, fullName string, f *clientcmd.Factory, out io.Writer) *co cmd.Flags().StringVarP(&o.Patch, "patch", "p", "", "The patch to be applied to the resource JSON file.") cmd.MarkFlagRequired("patch") cmd.Flags().String("type", "strategic", fmt.Sprintf("The type of patch being provided; one of %v", sets.StringKeySet(patchTypes).List())) + cmdutil.AddPrinterFlags(cmd) return cmd } @@ -134,6 +135,7 @@ func (o *PatchOptions) RunPatch() error { } r := o.Builder. + Internal(). FilenameParam(false, &resource.FilenameOptions{Recursive: false, Filenames: []string{o.Filename}}). Flatten(). Do() diff --git a/tools/etcdhelper/etcdhelper.go b/tools/etcdhelper/etcdhelper.go index a465672f3098..77ea13398e25 100644 --- a/tools/etcdhelper/etcdhelper.go +++ b/tools/etcdhelper/etcdhelper.go @@ -11,7 +11,7 @@ import ( "time" jsonserializer "k8s.io/apimachinery/pkg/runtime/serializer/json" - api "k8s.io/kubernetes/pkg/apis/core" + "k8s.io/kubernetes/pkg/kubectl/scheme" "github.com/coreos/etcd/clientv3" "github.com/coreos/etcd/pkg/transport" @@ -24,7 +24,7 @@ import ( ) func init() { - apiregistration.Install(api.GroupFactoryRegistry, api.Registry, api.Scheme) + apiregistration.Install(scheme.GroupFactoryRegistry, scheme.Registry, scheme.Scheme) } func main() { @@ -122,8 +122,8 @@ func getKey(client *clientv3.Client, key string) error { return err } - decoder := api.Codecs.UniversalDeserializer() - encoder := jsonserializer.NewSerializer(jsonserializer.DefaultMetaFactory, api.Scheme, api.Scheme, true) + decoder := scheme.Codecs.UniversalDeserializer() + encoder := jsonserializer.NewSerializer(jsonserializer.DefaultMetaFactory, scheme.Scheme, scheme.Scheme, true) for _, kv := range resp.Kvs { obj, gvk, err := decoder.Decode(kv.Value, nil, nil) @@ -149,8 +149,8 @@ func dump(client *clientv3.Client) error { } kvData := []etcd3kv{} - decoder := api.Codecs.UniversalDeserializer() - encoder := jsonserializer.NewSerializer(jsonserializer.DefaultMetaFactory, api.Scheme, api.Scheme, false) + decoder := scheme.Codecs.UniversalDeserializer() + encoder := jsonserializer.NewSerializer(jsonserializer.DefaultMetaFactory, scheme.Scheme, scheme.Scheme, false) objJSON := &bytes.Buffer{} for _, kv := range response.Kvs {