github.com/oam-dev/kubevela@v1.9.11/vela-templates/definitions/internal/policy/garbage-collect.cue (about) 1 "garbage-collect": { 2 annotations: {} 3 description: "Configure the garbage collect behaviour for the application." 4 labels: {} 5 attributes: {} 6 type: "policy" 7 } 8 9 template: { 10 #GarbageCollectPolicyRule: { 11 // +usage=Specify how to select the targets of the rule 12 selector: #ResourcePolicyRuleSelector 13 // +usage=Specify the strategy for target resource to recycle 14 strategy: *"onAppUpdate" | "onAppDelete" | "never" 15 // +usage=Specify the deletion propagation strategy for target resource to delete 16 propagation?: "orphan" | "cascading" 17 } 18 19 #ResourcePolicyRuleSelector: { 20 // +usage=Select resources by component names 21 componentNames?: [...string] 22 // +usage=Select resources by component types 23 componentTypes?: [...string] 24 // +usage=Select resources by oamTypes (COMPONENT or TRAIT) 25 oamTypes?: [...string] 26 // +usage=Select resources by trait types 27 traitTypes?: [...string] 28 // +usage=Select resources by resource types (like Deployment) 29 resourceTypes?: [...string] 30 // +usage=Select resources by their names 31 resourceNames?: [...string] 32 } 33 34 parameter: { 35 // +usage=If set, it will override the default revision limit number and customize this number for the current application 36 applicationRevisionLimit?: int 37 // +usage=If is set, outdated versioned resourcetracker will not be recycled automatically, outdated resources will be kept until resourcetracker be deleted manually 38 keepLegacyResource: *false | bool 39 // +usage=If is set, continue to execute gc when the workflow fails, by default gc will be executed only after the workflow succeeds 40 continueOnFailure: *false | bool 41 // +usage=Specify the list of rules to control gc strategy at resource level, if one resource is controlled by multiple rules, first rule will be used 42 rules?: [...#GarbageCollectPolicyRule] 43 } 44 }