mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
get the resource.Info out of the conversion business
This commit is contained in:
@@ -156,7 +156,7 @@ func (o PauseConfig) RunPause() error {
|
||||
allErrs = append(allErrs, err)
|
||||
continue
|
||||
}
|
||||
printer.PrintObj(info.AsVersioned(legacyscheme.Scheme), o.Out)
|
||||
printer.PrintObj(cmdutil.AsDefaultVersionedOrOriginal(info.Object, info.Mapping), o.Out)
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ func (o PauseConfig) RunPause() error {
|
||||
allErrs = append(allErrs, err)
|
||||
continue
|
||||
}
|
||||
printer.PrintObj(info.AsVersioned(legacyscheme.Scheme), o.Out)
|
||||
printer.PrintObj(cmdutil.AsDefaultVersionedOrOriginal(info.Object, info.Mapping), o.Out)
|
||||
}
|
||||
|
||||
return utilerrors.NewAggregate(allErrs)
|
||||
|
||||
@@ -161,7 +161,7 @@ func (o ResumeConfig) RunResume() error {
|
||||
allErrs = append(allErrs, err)
|
||||
continue
|
||||
}
|
||||
printer.PrintObj(info.AsVersioned(legacyscheme.Scheme), o.Out)
|
||||
printer.PrintObj(cmdutil.AsDefaultVersionedOrOriginal(info.Object, info.Mapping), o.Out)
|
||||
}
|
||||
|
||||
obj, err := resource.NewHelper(info.Client, info.Mapping).Patch(info.Namespace, info.Name, types.StrategicMergePatchType, patch.Patch)
|
||||
@@ -176,7 +176,7 @@ func (o ResumeConfig) RunResume() error {
|
||||
allErrs = append(allErrs, err)
|
||||
continue
|
||||
}
|
||||
printer.PrintObj(info.AsVersioned(legacyscheme.Scheme), o.Out)
|
||||
printer.PrintObj(cmdutil.AsDefaultVersionedOrOriginal(info.Object, info.Mapping), o.Out)
|
||||
}
|
||||
|
||||
return utilerrors.NewAggregate(allErrs)
|
||||
|
||||
@@ -168,7 +168,7 @@ func (o *UndoOptions) RunUndo() error {
|
||||
allErrs = append(allErrs, err)
|
||||
continue
|
||||
}
|
||||
printer.PrintObj(info.AsVersioned(legacyscheme.Scheme), o.Out)
|
||||
printer.PrintObj(cmdutil.AsDefaultVersionedOrOriginal(info.Object, info.Mapping), o.Out)
|
||||
}
|
||||
return utilerrors.NewAggregate(allErrs)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user