Create annotations to store migration replicas if it doesn't exist
@@ -709,6 +709,9 @@ func (m *MigrationController) prepareApplicationResource(
return err
}
replicas := spec["replicas"].(int64)
+ if !collections.Exists(content, "metadata.annotations") {
+ content["metadata.annotations"] = make(map[string]string)
+ }
annotations, err := collections.GetMap(content, "metadata.annotations")
if err != nil {
return err
