Short circuit anno/label transformer for performance.

This commit is contained in:
monopole
2021-01-08 17:44:08 -08:00
parent 6f2f401f6b
commit 769f65d6c4
7 changed files with 54 additions and 34 deletions

View File

@@ -28,6 +28,9 @@ func (p *plugin) Config(
}
func (p *plugin) Transform(m resmap.ResMap) error {
if len(p.Labels) == 0 {
return nil
}
for _, r := range m.Resources() {
err := r.ApplyFilter(labels.Filter{
Labels: p.Labels,