github.com/oam-dev/kubevela@v1.9.11/e2e/addon/mock/testdata/fluxcd/definitions/json-patch.yaml (about) 1 apiVersion: core.oam.dev/v1beta1 2 kind: TraitDefinition 3 metadata: 4 annotations: 5 definition.oam.dev/description: "A list of JSON6902 patch to selected target" 6 name: kustomize-json-patch 7 namespace: vela-system 8 spec: 9 schematic: 10 cue: 11 template: | 12 patch: { 13 spec: { 14 patchesJson6902: parameter.patchesJson 15 } 16 } 17 18 parameter: { 19 // +usage=A list of JSON6902 patch. 20 patchesJson: [...#jsonPatchItem] 21 } 22 23 // +usage=Contains a JSON6902 patch 24 #jsonPatchItem: { 25 target: #selector 26 patch: [...{ 27 // +usage=operation to perform 28 op: string | "add" | "remove" | "replace" | "move" | "copy" | "test" 29 // +usage=operate path e.g. /foo/bar 30 path: string 31 // +usage=specify source path when op is copy/move 32 from?: string 33 // +usage=specify opraation value when op is test/add/replace 34 value?: string 35 }] 36 } 37 38 // +usage=Selector specifies a set of resources 39 #selector: { 40 group?: string 41 version?: string 42 kind?: string 43 namespace?: string 44 name?: string 45 annotationSelector?: string 46 labelSelector?: string 47 }