mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 01:14:22 +00:00
Merge pull request #2748 from monopole/tweakSequenceTreatment
Tweak sequence treatment in fieldspecs
This commit is contained in:
@@ -51,7 +51,7 @@ type AnnotationSetter struct {
|
||||
func (s AnnotationSetter) Filter(rn *RNode) (*RNode, error) {
|
||||
// some tools get confused about the type if annotations are not quoted
|
||||
v := NewScalarRNode(s.Value)
|
||||
v.YNode().Tag = StringTag
|
||||
v.YNode().Tag = NodeTagString
|
||||
v.YNode().Style = yaml.SingleQuotedStyle
|
||||
|
||||
if err := ClearEmptyAnnotations(rn); err != nil {
|
||||
@@ -103,7 +103,7 @@ type LabelSetter struct {
|
||||
func (s LabelSetter) Filter(rn *RNode) (*RNode, error) {
|
||||
// some tools get confused about the type if labels are not quoted
|
||||
v := NewScalarRNode(s.Value)
|
||||
v.YNode().Tag = StringTag
|
||||
v.YNode().Tag = NodeTagString
|
||||
v.YNode().Style = yaml.SingleQuotedStyle
|
||||
return rn.Pipe(
|
||||
PathGetter{Path: []string{"metadata", "labels"}, Create: yaml.MappingNode},
|
||||
|
||||
Reference in New Issue
Block a user