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