github.com/oam-dev/kubevela@v1.9.11/charts/vela-core/templates/defwithtemplate/garbage-collect.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/garbage-collect.cue
     3  apiVersion: core.oam.dev/v1beta1
     4  kind: PolicyDefinition
     5  metadata:
     6    annotations:
     7      definition.oam.dev/description: Configure the garbage collect behaviour for the application.
     8    name: garbage-collect
     9    namespace: {{ include "systemDefinitionNamespace" . }}
    10  spec:
    11    schematic:
    12      cue:
    13        template: |
    14          #GarbageCollectPolicyRule: {
    15          	// +usage=Specify how to select the targets of the rule
    16          	selector: #ResourcePolicyRuleSelector
    17          	// +usage=Specify the strategy for target resource to recycle
    18          	strategy: *"onAppUpdate" | "onAppDelete" | "never"
    19          	// +usage=Specify the deletion propagation strategy for target resource to delete
    20          	propagation?: "orphan" | "cascading"
    21          }
    22  
    23          #ResourcePolicyRuleSelector: {
    24          	// +usage=Select resources by component names
    25          	componentNames?: [...string]
    26          	// +usage=Select resources by component types
    27          	componentTypes?: [...string]
    28          	// +usage=Select resources by oamTypes (COMPONENT or TRAIT)
    29          	oamTypes?: [...string]
    30          	// +usage=Select resources by trait types
    31          	traitTypes?: [...string]
    32          	// +usage=Select resources by resource types (like Deployment)
    33          	resourceTypes?: [...string]
    34          	// +usage=Select resources by their names
    35          	resourceNames?: [...string]
    36          }
    37  
    38          parameter: {
    39          	// +usage=If set, it will override the default revision limit number and customize this number for the current application
    40          	applicationRevisionLimit?: int
    41          	// +usage=If is set, outdated versioned resourcetracker will not be recycled automatically, outdated resources will be kept until resourcetracker be deleted manually
    42          	keepLegacyResource: *false | bool
    43          	// +usage=If is set, continue to execute gc when the workflow fails, by default gc will be executed only after the workflow succeeds
    44          	continueOnFailure: *false | bool
    45          	// +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
    46          	rules?: [...#GarbageCollectPolicyRule]
    47          }
    48