mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-23 22:46:53 +00:00
Fix: kustomize json patch trait definition (#2239)
This commit is contained in:
@@ -5985,7 +5985,11 @@ data:
|
||||
template: "patch: {\n\tspec: {\n\t\tpatchesJson6902: parameter.patchesJson\n\t}\n}\n\nparameter:
|
||||
{\n\t// +usage=A list of JSON6902 patch.\n\tpatchesJson: [...#jsonPatchItem]\n}\n\n//
|
||||
+usage=Contains a JSON6902 patch\n#jsonPatchItem: {\n\ttarget: #selector\n\tpatch:
|
||||
{\n\t\top: string\n\t\tpath: string\n\t\tvalue?: string\n\t}\n}\n\n//
|
||||
[...{\n\t\t// +usage=operation to perform\n\t\top: string | \"add\"
|
||||
| \"remove\" | \"replace\" | \"move\" | \"copy\" | \"test\"\n\t\t//
|
||||
+usage=operate path e.g. /foo/bar\n\t\tpath: string\n\t\t// +usage=specify
|
||||
source path when op is copy/move\n\t\tfrom?: string\n\t\t// +usage=specify
|
||||
opraation value when op is test/add/replace\n\t\tvalue?: string\n\t}]\n}\n\n//
|
||||
+usage=Selector specifies a set of resources\n#selector: {\n\tgroup?:
|
||||
\ string\n\tversion?: string\n\tkind?: string\n\tnamespace?:
|
||||
\ string\n\tname?: string\n\tannotationSelector?:
|
||||
|
||||
@@ -5982,7 +5982,11 @@ spec:
|
||||
template: "patch: {\n\tspec: {\n\t\tpatchesJson6902: parameter.patchesJson\n\t}\n}\n\nparameter:
|
||||
{\n\t// +usage=A list of JSON6902 patch.\n\tpatchesJson: [...#jsonPatchItem]\n}\n\n//
|
||||
+usage=Contains a JSON6902 patch\n#jsonPatchItem: {\n\ttarget: #selector\n\tpatch:
|
||||
{\n\t\top: string\n\t\tpath: string\n\t\tvalue?: string\n\t}\n}\n\n//
|
||||
[...{\n\t\t// +usage=operation to perform\n\t\top: string | \"add\"
|
||||
| \"remove\" | \"replace\" | \"move\" | \"copy\" | \"test\"\n\t\t//
|
||||
+usage=operate path e.g. /foo/bar\n\t\tpath: string\n\t\t// +usage=specify
|
||||
source path when op is copy/move\n\t\tfrom?: string\n\t\t// +usage=specify
|
||||
opraation value when op is test/add/replace\n\t\tvalue?: string\n\t}]\n}\n\n//
|
||||
+usage=Selector specifies a set of resources\n#selector: {\n\tgroup?:
|
||||
\ string\n\tversion?: string\n\tkind?: string\n\tnamespace?:
|
||||
\ string\n\tname?: string\n\tannotationSelector?:
|
||||
|
||||
@@ -22,11 +22,16 @@ spec:
|
||||
// +usage=Contains a JSON6902 patch
|
||||
#jsonPatchItem: {
|
||||
target: #selector
|
||||
patch: {
|
||||
op: string
|
||||
path: string
|
||||
patch: [...{
|
||||
// +usage=operation to perform
|
||||
op: string | "add" | "remove" | "replace" | "move" | "copy" | "test"
|
||||
// +usage=operate path e.g. /foo/bar
|
||||
path: string
|
||||
// +usage=specify source path when op is copy/move
|
||||
from?: string
|
||||
// +usage=specify opraation value when op is test/add/replace
|
||||
value?: string
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
||||
// +usage=Selector specifies a set of resources
|
||||
|
||||
Reference in New Issue
Block a user