github.com/oam-dev/kubevela@v1.9.11/references/cli/test-data/dry-run/definitions/testing-worker-def.yaml (about) 1 apiVersion: core.oam.dev/v1beta1 2 kind: ComponentDefinition 3 metadata: 4 name: myworker 5 spec: 6 workload: 7 definition: 8 apiVersion: apps/v1 9 kind: Deployment 10 schematic: 11 cue: 12 template: | 13 output: { 14 apiVersion: "apps/v1" 15 kind: "Deployment" 16 } 17 output: { 18 spec: { 19 selector: matchLabels: { 20 "app.oam.dev/component": context.name 21 } 22 23 template: { 24 metadata: labels: { 25 "app.oam.dev/component": context.name 26 } 27 28 spec: { 29 containers: [{ 30 name: context.name 31 image: parameter.image 32 33 if parameter["cmd"] != _|_ { 34 command: parameter.cmd 35 } 36 }] 37 } 38 } 39 } 40 } 41 42 parameter: { 43 // +usage=Which image would you like to use for your service 44 // +short=i 45 image: string 46 // +usage=Commands to run in the container 47 cmd?: [...string] 48 } 49