github.com/oam-dev/kubevela@v1.9.11/charts/vela-core/templates/defwithtemplate/read-only.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/read-only.cue 3 apiVersion: core.oam.dev/v1beta1 4 kind: PolicyDefinition 5 metadata: 6 annotations: 7 definition.oam.dev/description: Configure the resources to be read-only in the application (no update / state-keep). 8 name: read-only 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 read only strategy at resource level. 36 // The selected resource will be read-only to the current application. If the target resource does 37 // not exist, error will be raised. 38 rules?: [...#PolicyRule] 39 } 40