github.com/oam-dev/kubevela@v1.9.11/charts/vela-core/templates/defwithtemplate/apply-once.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/apply-once.cue 3 apiVersion: core.oam.dev/v1beta1 4 kind: PolicyDefinition 5 metadata: 6 annotations: 7 definition.oam.dev/description: Allow configuration drift for applied resources, delivery the resource without continuously reconciliation. 8 name: apply-once 9 namespace: {{ include "systemDefinitionNamespace" . }} 10 spec: 11 schematic: 12 cue: 13 template: | 14 #ApplyOnceStrategy: { 15 // +usage=When the strategy takes effect,e.g. onUpdate、onStateKeep 16 affect?: string 17 // +usage=Specify the path of the resource that allow configuration drift 18 path: [...string] 19 } 20 21 #ApplyOncePolicyRule: { 22 // +usage=Specify how to select the targets of the rule 23 selector?: #ResourcePolicyRuleSelector 24 // +usage=Specify the strategy for configuring the resource level configuration drift behaviour 25 strategy: #ApplyOnceStrategy 26 } 27 28 #ResourcePolicyRuleSelector: { 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=Whether to enable apply-once for the whole application 45 enable: *false | bool 46 // +usage=Specify the rules for configuring apply-once policy in resource level 47 rules?: [...#ApplyOncePolicyRule] 48 } 49