Manage name changes (prefix/suffix) via YAML annotations rather than via in-memory-only fields.

This commit is contained in:
Natasha Sarkar
2021-01-11 13:06:21 -08:00
parent ea5d08bac5
commit bd4580d73a
34 changed files with 539 additions and 61 deletions

View File

@@ -108,6 +108,7 @@ func (p *plugin) transformJson6902(m resmap.ResMap, patch jsonpatch.Patch) error
return err
}
for _, res := range resources {
res.SetOriginalName(res.GetName(), false)
err = res.ApplyFilter(patchjson6902.Filter{
Patch: p.Patch,
})

View File

@@ -306,7 +306,7 @@ path: patch.yaml
target:
name: myDeploy
`, someDeploymentResources)
th.AssertActualEqualsExpected(rm, `
th.AssertActualEqualsExpectedNoIdAnnotations(rm, `
apiVersion: apps/v1
kind: Deployment
metadata: