mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
Use k8s schema to determine formatting if no type on setter
This commit is contained in:
@@ -126,7 +126,7 @@ metadata:
|
||||
},
|
||||
{
|
||||
name: "set-foo-no-type",
|
||||
description: "if a type is not specified for a setter, keep the existing quoting",
|
||||
description: "if a type is not specified for a setter or k8s schema, keep existing quoting",
|
||||
setter: "foo",
|
||||
openapi: `
|
||||
openAPI:
|
||||
@@ -138,16 +138,16 @@ openAPI:
|
||||
value: "4"
|
||||
`,
|
||||
input: `
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
apiVersion: custom/v1
|
||||
kind: Example
|
||||
metadata:
|
||||
name: nginx-deployment
|
||||
annotations:
|
||||
foo: 3 # {"$ref": "#/definitions/io.k8s.cli.setters.foo"}
|
||||
`,
|
||||
expected: `
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
apiVersion: custom/v1
|
||||
kind: Example
|
||||
metadata:
|
||||
name: nginx-deployment
|
||||
annotations:
|
||||
|
||||
Reference in New Issue
Block a user