Allow setters/substitutions with . in the name

This commit is contained in:
Morten Torkildsen
2020-07-10 17:09:43 -07:00
parent 556eb48651
commit c419c1efc3
4 changed files with 71 additions and 3 deletions

View File

@@ -169,6 +169,29 @@ metadata:
name: nginx-deployment
spec:
replicas: 3
`,
},
{
name: "ref has . in name of setter",
add: Add{
FieldValue: "3",
Ref: "#/definitions/io.k8s.cli.setters.foo.bar",
},
input: `
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 3
`,
expected: `
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 3 # {"$openapi":"foo.bar"}
`,
},
}