mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 18:25:26 +00:00
Rename id annotations to build annotations.
This commit is contained in:
@@ -246,6 +246,6 @@ type ResMap interface {
|
||||
ApplySmPatch(
|
||||
selectedSet *resource.IdSet, patch *resource.Resource) error
|
||||
|
||||
// Remove annotations used exclusively by the kustomize build process.
|
||||
RemoveIdAnnotations()
|
||||
// RemoveBuildAnnotations removes annotations created by the build process.
|
||||
RemoveBuildAnnotations()
|
||||
}
|
||||
|
||||
@@ -621,8 +621,8 @@ func (m *resWrangler) ApplySmPatch(
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *resWrangler) RemoveIdAnnotations() {
|
||||
func (m *resWrangler) RemoveBuildAnnotations() {
|
||||
for _, r := range m.Resources() {
|
||||
r.RemoveIdAnnotations()
|
||||
r.RemoveBuildAnnotations()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -998,7 +998,7 @@ spec:
|
||||
return
|
||||
}
|
||||
assert.False(t, tc.errorExpected)
|
||||
m.RemoveIdAnnotations()
|
||||
m.RemoveBuildAnnotations()
|
||||
yml, err := m.AsYaml()
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, strings.Join(tc.expected, "---\n"), string(yml))
|
||||
@@ -1111,7 +1111,7 @@ $patch: delete
|
||||
assert.NoError(t, err, name)
|
||||
assert.NoError(t, m.ApplySmPatch(idSet, p), name)
|
||||
assert.Equal(t, tc.finalMapSize, m.Size(), name)
|
||||
m.RemoveIdAnnotations()
|
||||
m.RemoveBuildAnnotations()
|
||||
yml, err := m.AsYaml()
|
||||
assert.NoError(t, err, name)
|
||||
assert.Equal(t, tc.expected, string(yml), name)
|
||||
|
||||
Reference in New Issue
Block a user