mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
Short circuit anno/label transformer for performance.
This commit is contained in:
@@ -648,9 +648,15 @@ func (s FieldSetter) Filter(rn *RNode) (*RNode, error) {
|
||||
}
|
||||
|
||||
// create the field
|
||||
rn.YNode().Content = append(rn.YNode().Content,
|
||||
&yaml.Node{Kind: yaml.ScalarNode, HeadComment: s.Comments.HeadComment,
|
||||
LineComment: s.Comments.LineComment, FootComment: s.Comments.FootComment, Value: s.Name},
|
||||
rn.YNode().Content = append(
|
||||
rn.YNode().Content,
|
||||
&yaml.Node{
|
||||
Kind: yaml.ScalarNode,
|
||||
Value: s.Name,
|
||||
HeadComment: s.Comments.HeadComment,
|
||||
LineComment: s.Comments.LineComment,
|
||||
FootComment: s.Comments.FootComment,
|
||||
},
|
||||
s.Value.YNode())
|
||||
return s.Value, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user