tighten .Info for kubectl to avoid unpredictable conversion

This commit is contained in:
David Eads
2018-04-26 11:21:41 -04:00
parent 6900f8856f
commit b8177bb9af
20 changed files with 71 additions and 87 deletions

View File

@@ -246,12 +246,7 @@ func (o AnnotateOptions) RunAnnotate(f cmdutil.Factory, cmd *cobra.Command) erro
}
var outputObj runtime.Object
var obj runtime.Object
obj, err = info.ObjectConverter.ConvertToVersion(info.Object, info.Mapping.GroupVersionKind.GroupVersion())
if err != nil {
return err
}
obj := info.Object
if o.dryrun || o.local {
if err := o.updateAnnotations(obj); err != nil {