github.com/oam-dev/kubevela@v1.9.11/charts/vela-core/templates/defwithtemplate/resource-update.yaml (about) 1 # Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file. 2 # Definition source cue file: vela-templates/definitions/internal/resource-update.cue 3 apiVersion: core.oam.dev/v1beta1 4 kind: PolicyDefinition 5 metadata: 6 annotations: 7 definition.oam.dev/description: Configure the update strategy for selected resources. 8 name: resource-update 9 namespace: {{ include "systemDefinitionNamespace" . }} 10 spec: 11 schematic: 12 cue: 13 template: | 14 #PolicyRule: { 15 // +usage=Specify how to select the targets of the rule 16 selector: #RuleSelector 17 // +usage=The update strategy for the target resources 18 strategy: #Strategy 19 } 20 21 #Strategy: { 22 // +usage=Specify the op for updating target resources 23 op: *"patch" | "replace" 24 // +usage=Specify which fields would trigger recreation when updated 25 recreateFields?: [...string] 26 } 27 28 #RuleSelector: { 29 // +usage=Select resources by component names 30 componentNames?: [...string] 31 // +usage=Select resources by component types 32 componentTypes?: [...string] 33 // +usage=Select resources by oamTypes (COMPONENT or TRAIT) 34 oamTypes?: [...string] 35 // +usage=Select resources by trait types 36 traitTypes?: [...string] 37 // +usage=Select resources by resource types (like Deployment) 38 resourceTypes?: [...string] 39 // +usage=Select resources by their names 40 resourceNames?: [...string] 41 } 42 43 parameter: { 44 // +usage=Specify the list of rules to control resource update strategy at resource level. 45 rules?: [...#PolicyRule] 46 } 47