Skip to content

Commit

Permalink
don't set style in run-fs
Browse files Browse the repository at this point in the history
  • Loading branch information
shanalily committed Feb 26, 2022
1 parent 99e6c57 commit 12c2453
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
22 changes: 11 additions & 11 deletions cmd/config/internal/commands/e2e/e2e_test.go
Expand Up @@ -339,7 +339,7 @@ metadata:
name: "container_function_no_args",
skipIfFalseEnv: "KUSTOMIZE_DOCKER_E2E",
args: func(d string) []string {
return []string{"--image", "gcr.io/kustomize-functions/e2econtainerconfig"}
return []string{"--image", "shanalily/e2econtainerconfig"}
},
files: func(d string) map[string]string {
return map[string]string{
Expand Down Expand Up @@ -372,7 +372,7 @@ metadata:
skipIfFalseEnv: "KUSTOMIZE_DOCKER_E2E",
args: func(d string) []string {
return []string{
"--image", "gcr.io/kustomize-functions/e2econtainerconfig",
"--image", "shanalily/e2econtainerconfig",
"--", "stringValue=a", "intValue=1", "boolValue=true",
}
},
Expand Down Expand Up @@ -416,7 +416,7 @@ metadata:
annotations:
config.kubernetes.io/function: |
container:
image: "gcr.io/kustomize-functions/e2econtainerconfig"
image: "shanalily/e2econtainerconfig"
`,
}
},
Expand All @@ -430,7 +430,7 @@ metadata:
annotations:
config.kubernetes.io/function: |
container:
image: "gcr.io/kustomize-functions/e2econtainerconfig"
image: "shanalily/e2econtainerconfig"
a-string-value: ''
a-int-value: '0'
a-bool-value: 'false'
Expand All @@ -452,7 +452,7 @@ metadata:
annotations:
config.kubernetes.io/function: |
container:
image: "gcr.io/kustomize-functions/e2econtainerconfig"
image: "shanalily/e2econtainerconfig"
data:
stringValue: a
intValue: 2
Expand All @@ -476,7 +476,7 @@ metadata:
annotations:
config.kubernetes.io/function: |
container:
image: "gcr.io/kustomize-functions/e2econtainerconfig"
image: "shanalily/e2econtainerconfig"
a-string-value: 'a'
a-int-value: '2'
a-bool-value: 'true'
Expand Down Expand Up @@ -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
`,
}
Expand Down Expand Up @@ -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
`,
}
Expand Down Expand Up @@ -785,7 +785,7 @@ func build() string {
return
}
build = exec.Command(
"docker", "build", ".", "-t", "gcr.io/kustomize-functions/e2econtainerconfig")
"docker", "build", ".", "-t", "shanalily/e2econtainerconfig")
build.Dir = "e2econtainerconfig"
build.Stdout = os.Stdout
build.Stderr = os.Stderr
Expand Down
4 changes: 3 additions & 1 deletion cmd/config/internal/commands/run-fns.go
Expand Up @@ -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
}
Expand Down

0 comments on commit 12c2453

Please sign in to comment.