github.com/oam-dev/kubevela@v1.9.11/charts/vela-core/templates/defwithtemplate/shared-resource.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/shared-resource.cue 3 apiVersion: core.oam.dev/v1beta1 4 kind: PolicyDefinition 5 metadata: 6 annotations: 7 definition.oam.dev/description: Configure the resources to be sharable across applications. 8 name: shared-resource 9 namespace: {{ include "systemDefinitionNamespace" . }} 10 spec: 11 schematic: 12 cue: 13 template: | 14 #SharedResourcePolicyRule: { 15 // +usage=Specify how to select the targets of the rule 16 selector: #ResourcePolicyRuleSelector 17 } 18 19 #ResourcePolicyRuleSelector: { 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 shared-resource strategy at resource level. 36 // The selected resource will be sharable across applications. (That means multiple applications 37 // can all read it without conflict, but only the first one can write it) 38 rules?: [...#SharedResourcePolicyRule] 39 } 40