refactor builder in kubectl factory
This commit is contained in:
@@ -153,13 +153,7 @@ func RunPatch(f cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []strin
|
||||
return fmt.Errorf("unable to parse %q: %v", patch, err)
|
||||
}
|
||||
|
||||
mapper, typer, err := f.UnstructuredObject()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
r := f.NewBuilder().
|
||||
Unstructured(f.UnstructuredClientForMapping, mapper, typer).
|
||||
r := f.NewUnstructuredBuilder().
|
||||
ContinueOnError().
|
||||
NamespaceParam(cmdNamespace).DefaultNamespace().
|
||||
FilenameParam(enforceNamespace, &options.FilenameOptions).
|
||||
|
Reference in New Issue
Block a user