github.com/oam-dev/kubevela@v1.9.11/vela-templates/definitions/internal/policy/take-over.cue (about)

     1  "take-over": {
     2  	annotations: {}
     3  	description: "Configure the resources to be able to take over when it belongs to no application."
     4  	labels: {}
     5  	attributes: {}
     6  	type: "policy"
     7  }
     8  
     9  template: {
    10  	#PolicyRule: {
    11  		// +usage=Specify how to select the targets of the rule
    12  		selector: #RuleSelector
    13  	}
    14  
    15  	#RuleSelector: {
    16  		// +usage=Select resources by component names
    17  		componentNames?: [...string]
    18  		// +usage=Select resources by component types
    19  		componentTypes?: [...string]
    20  		// +usage=Select resources by oamTypes (COMPONENT or TRAIT)
    21  		oamTypes?: [...string]
    22  		// +usage=Select resources by trait types
    23  		traitTypes?: [...string]
    24  		// +usage=Select resources by resource types (like Deployment)
    25  		resourceTypes?: [...string]
    26  		// +usage=Select resources by their names
    27  		resourceNames?: [...string]
    28  	}
    29  
    30  	parameter: {
    31  		// +usage=Specify the list of rules to control take over strategy at resource level.
    32  		// The selected resource will be able to be taken over by the current application when the resource belongs to no
    33  		// one.
    34  		rules?: [...#PolicyRule]
    35  	}
    36  }