fix --local flag for kubectl set commands

This commit is contained in:
juanvallejo
2017-05-16 17:52:51 -04:00
parent 0cb3cb2549
commit d036686185
42 changed files with 293 additions and 151 deletions

View File

@@ -77,14 +77,12 @@ func RunStatus(f cmdutil.Factory, cmd *cobra.Command, out io.Writer, args []stri
return cmdutil.UsageError(cmd, "Required resource not specified.")
}
mapper, typer := f.Object()
cmdNamespace, enforceNamespace, err := f.DefaultNamespace()
if err != nil {
return err
}
r := resource.NewBuilder(mapper, f.CategoryExpander(), typer, resource.ClientMapperFunc(f.ClientForMapping), f.Decoder(true)).
r := f.NewBuilder(true).
NamespaceParam(cmdNamespace).DefaultNamespace().
FilenameParam(enforceNamespace, options).
ResourceTypeOrNameArgs(true, args...).