github.com/oam-dev/kubevela@v1.9.11/charts/vela-core/templates/defwithtemplate/take-over.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/take-over.cue
     3  apiVersion: core.oam.dev/v1beta1
     4  kind: PolicyDefinition
     5  metadata:
     6    annotations:
     7      definition.oam.dev/description: Configure the resources to be able to take over when it belongs to no application.
     8    name: take-over
     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          }
    18  
    19          #RuleSelector: {
    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=Specify the list of rules to control take over strategy at resource level.
    36          	// The selected resource will be able to be taken over by the current application when the resource belongs to no
    37          	// one.
    38          	rules?: [...#PolicyRule]
    39          }
    40