Add field renaming to app migration
@@ -123,6 +123,18 @@ func (f *ExperimentMigrationFilter) MigrateRSOApplicationV1alpha1(node *yaml.RNo
yaml.Tee(
yaml.SetField("apiVersion", yaml.NewStringRNode(optimizeappsv1alpha1.GroupVersion.String())),
),
+
+ // Rename fields
+ yaml.Tee(RenameField("parameters", "configuration")),
+ yaml.Tee(RenameField("stormForger", "stormforge-perf-config")),
+ yaml.Tee(
+ yaml.Lookup("scenarios"),
+ yaml.FilterFunc(func(node *yaml.RNode) (*yaml.RNode, error) {
+ return node, node.VisitElements(func(node *yaml.RNode) error {
+ return node.PipeE(RenameField("stormforger", "stormforge-perf"))
+ })
+ }),
+ ),
)
}
