mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 10:15:22 +00:00
Short circuit anno/label transformer for performance.
This commit is contained in:
@@ -24,6 +24,9 @@ func (p *AnnotationsTransformerPlugin) Config(
|
||||
}
|
||||
|
||||
func (p *AnnotationsTransformerPlugin) Transform(m resmap.ResMap) error {
|
||||
if len(p.Annotations) == 0 {
|
||||
return nil
|
||||
}
|
||||
for _, r := range m.Resources() {
|
||||
err := r.ApplyFilter(annotations.Filter{
|
||||
Annotations: p.Annotations,
|
||||
|
||||
@@ -24,6 +24,9 @@ func (p *LabelTransformerPlugin) Config(
|
||||
}
|
||||
|
||||
func (p *LabelTransformerPlugin) 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,
|
||||
|
||||
Reference in New Issue
Block a user