mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-12 01:14:22 +00:00
Error on creation if setter/subst exists
This commit is contained in:
@@ -125,6 +125,24 @@ openAPI:
|
||||
err: "substitution with name my-image already exists, substitution and setter can't have same name",
|
||||
},
|
||||
|
||||
{
|
||||
name: "error if setter with same name exists",
|
||||
args: []string{
|
||||
"my-image", "ubuntu"},
|
||||
inputOpenAPI: `
|
||||
apiVersion: v1alpha1
|
||||
kind: Example
|
||||
openAPI:
|
||||
definitions:
|
||||
io.k8s.cli.setters.my-image:
|
||||
x-k8s-cli:
|
||||
setter:
|
||||
name: my-image
|
||||
value: "nginx"
|
||||
`,
|
||||
err: "setter with name my-image already exists, if you want to modify it, please delete the existing setter and recreate it",
|
||||
},
|
||||
|
||||
{
|
||||
name: "add replicas with schema",
|
||||
args: []string{"replicas", "3", "--description", "hello world", "--set-by", "me"},
|
||||
|
||||
Reference in New Issue
Block a user