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

@@ -32,6 +32,7 @@ func (p *plugin) Transform(m resmap.ResMap) error {
if err != nil {
return err
}
res.SetOriginalName(res.GetName(), false)
res.SetName(fmt.Sprintf("%s-%s", res.GetName(), h))
}
}

View File

@@ -53,7 +53,7 @@ spec:
image: nginx:1.7.9
`)
th.AssertActualEqualsExpected(rm, `
th.AssertActualEqualsExpectedNoIdAnnotations(rm, `
apiVersion: v1
kind: ConfigMap
metadata: