Pass runtime.Object to Helper.Create/Replace

This commit is contained in:
Jordan Liggitt
2015-10-28 12:43:21 -04:00
parent 1524d7490a
commit b58e62e7d4
8 changed files with 29 additions and 90 deletions

View File

@@ -207,11 +207,7 @@ func RunExpose(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []str
}
// Serialize the object with the annotation applied.
data, err := info.Mapping.Codec.Encode(object)
if err != nil {
return err
}
object, err = resource.NewHelper(info.Client, info.Mapping).Create(namespace, false, data)
object, err = resource.NewHelper(info.Client, info.Mapping).Create(namespace, false, object)
if err != nil {
return err
}