mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47: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:
@@ -122,12 +122,13 @@ func (o *SetLastAppliedOptions) Complete(f cmdutil.Factory, cmd *cobra.Command)
|
||||
}
|
||||
|
||||
func (o *SetLastAppliedOptions) Validate(f cmdutil.Factory, cmd *cobra.Command) error {
|
||||
builder, err := f.NewUnstructuredBuilder(true)
|
||||
mapper, typer, err := f.UnstructuredObject()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
r := builder.
|
||||
r := f.NewBuilder().
|
||||
Unstructured(f.UnstructuredClientForMapping, mapper, typer).
|
||||
NamespaceParam(o.Namespace).DefaultNamespace().
|
||||
FilenameParam(o.EnforceNamespace, &o.FilenameOptions).
|
||||
Latest().
|
||||
|
||||
Reference in New Issue
Block a user