github.com/oam-dev/kubevela@v1.9.11/vela-templates/definitions/internal/policy/shared-resource.cue (about) 1 "shared-resource": { 2 annotations: {} 3 description: "Configure the resources to be sharable across applications." 4 labels: {} 5 attributes: {} 6 type: "policy" 7 } 8 9 template: { 10 #SharedResourcePolicyRule: { 11 // +usage=Specify how to select the targets of the rule 12 selector: #ResourcePolicyRuleSelector 13 } 14 15 #ResourcePolicyRuleSelector: { 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 shared-resource strategy at resource level. 32 // The selected resource will be sharable across applications. (That means multiple applications 33 // can all read it without conflict, but only the first one can write it) 34 rules?: [...#SharedResourcePolicyRule] 35 } 36 }