add Local and Unstructured builder attributes

Moves DisabledClientMapperForMapping wrapper to new Local attribute.
Removes Factory#NewUnstructuredBuilder in favor of new Unstructured
builder attribute.
This commit is contained in:
juanvallejo
2017-08-02 16:23:07 -04:00
parent c10f4f78bc
commit 90d76adb4b
39 changed files with 143 additions and 157 deletions

View File

@@ -123,7 +123,7 @@ func (o *SelectorOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args [
}
includeUninitialized := cmdutil.ShouldIncludeUninitialized(cmd, false)
o.builder = f.NewBuilder(!o.local).
o.builder = f.NewBuilder().
ContinueOnError().
NamespaceParam(cmdNamespace).DefaultNamespace().
FilenameParam(enforceNamespace, &o.fileOptions).
@@ -141,6 +141,8 @@ func (o *SelectorOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args [
if len(o.resources) > 0 {
return resource.LocalResourceError
}
o.builder = o.builder.Local(f.ClientForMapping)
}
o.PrintObject = func(obj runtime.Object) error {