mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user