retain quotes in namespace transformer filter (#4421)

* check tag values for double quoting

* reuse setentry

* don't override single quotes in merge and fix cm generator immutable val

* get rid of comment

* starlark annotation tests

* don't commit test image changes

* set network to bool

* isSet bool

* updating e2e config tool

* leave createtag

* fn command failing unmarshal test

* fn command test

* don't set style in run-fs

* use setentry to set tag

* remove e2e test changes and make IsStringValue an RNode method
This commit is contained in:
Shoshana Malfatto
2022-03-23 14:25:19 -07:00
committed by GitHub
parent fbfcb0479a
commit 7b0ec99d90
14 changed files with 95 additions and 18 deletions

View File

@@ -41,5 +41,5 @@ func (rc Filter) run(node *yaml.RNode) (*yaml.RNode, error) {
}
func (rc Filter) set(node *yaml.RNode) error {
return rc.trackableSetter.SetScalar(strconv.FormatInt(rc.Replica.Count, 10))(node)
return rc.trackableSetter.SetEntry("", strconv.FormatInt(rc.Replica.Count, 10), yaml.NodeTagInt)(node)
}

View File

@@ -192,6 +192,7 @@ spec:
expectedSetValueArgs: []filtertest_test.SetValueArg{
{
Value: "42",
Tag: "!!int",
NodePath: []string{"spec", "replicas"},
},
},