mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-14 02:20:53 +00:00
Manage name changes (prefix/suffix) via YAML annotations rather than via in-memory-only fields.
This commit is contained in:
@@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ spec:
|
||||
image: nginx:1.7.9
|
||||
`)
|
||||
|
||||
th.AssertActualEqualsExpected(rm, `
|
||||
th.AssertActualEqualsExpectedNoIdAnnotations(rm, `
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
|
||||
Reference in New Issue
Block a user