diff --git a/cmd/config/internal/commands/e2e/e2e_test.go b/cmd/config/internal/commands/e2e/e2e_test.go index 4044b1bab5..8a1f393547 100644 --- a/cmd/config/internal/commands/e2e/e2e_test.go +++ b/cmd/config/internal/commands/e2e/e2e_test.go @@ -605,8 +605,8 @@ kind: Deployment metadata: name: foo annotations: - a-bool-value: "true" - a-int-value: "2" + a-bool-value: true + a-int-value: 2 a-string-value: a `, } @@ -640,8 +640,8 @@ kind: Deployment metadata: name: foo annotations: - a-bool-value: "true" - a-int-value: "2" + a-bool-value: true + a-int-value: 2 a-string-value: a `, } diff --git a/cmd/config/internal/commands/run-fns.go b/cmd/config/internal/commands/run-fns.go index 5da5722adf..481969fb7a 100644 --- a/cmd/config/internal/commands/run-fns.go +++ b/cmd/config/internal/commands/run-fns.go @@ -236,7 +236,9 @@ data: {} if len(kv) != 2 { return nil, fmt.Errorf("args must have keys and values separated by =") } - err := dataField.PipeE(yaml.SetField(kv[0], yaml.NewScalarRNode(kv[1]))) + // do not set style since function should determine tag and style + err := dataField.PipeE( + yaml.FieldSetter{Name: kv[0], Value: yaml.NewScalarRNode(kv[1]), OverrideStyle: true}) if err != nil { return nil, err }