set transformer annotation when the option is specified

This commit is contained in:
natasha41575
2022-01-07 14:38:09 -08:00
parent 6e5d2674ce
commit 2c23b960ff
11 changed files with 727 additions and 34 deletions

View File

@@ -112,5 +112,11 @@ func (b *Kustomizer) Run(
}
}
m.RemoveBuildAnnotations()
if !utils.StringSliceContains(kt.Kustomization().BuildMetadata, types.OriginAnnotations) {
m.RemoveOriginAnnotations()
}
if !utils.StringSliceContains(kt.Kustomization().BuildMetadata, types.TransformerAnnotations) {
m.RemoveTransformerAnnotations()
}
return m, nil
}