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

     1  "read-only": {
     2  	annotations: {}
     3  	description: "Configure the resources to be read-only in the application (no update / state-keep)."
     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 read only strategy at resource level.
    32  		// The selected resource will be read-only to the current application. If the target resource does
    33  		// not exist, error will be raised.
    34  		rules?: [...#PolicyRule]
    35  	}
    36  }