remove confusing flexibility for metadata interpretation

This commit is contained in:
David Eads
2018-04-23 10:23:01 -04:00
parent 9b7439d77d
commit 0710f72c65
34 changed files with 113 additions and 165 deletions

View File

@@ -219,7 +219,7 @@ func (o *ReplaceOptions) Run() error {
return err
}
if err := kubectl.CreateOrUpdateAnnotation(o.createAnnotation, info, cmdutil.InternalVersionJSONEncoder()); err != nil {
if err := kubectl.CreateOrUpdateAnnotation(o.createAnnotation, info.Object, cmdutil.InternalVersionJSONEncoder()); err != nil {
return cmdutil.AddSourceToErr("replacing", info.Source, err)
}
@@ -315,7 +315,7 @@ func (o *ReplaceOptions) forceReplace() error {
return err
}
if err := kubectl.CreateOrUpdateAnnotation(o.createAnnotation, info, cmdutil.InternalVersionJSONEncoder()); err != nil {
if err := kubectl.CreateOrUpdateAnnotation(o.createAnnotation, info.Object, cmdutil.InternalVersionJSONEncoder()); err != nil {
return err
}