github.com/kubevela/workflow@v0.6.0/e2e/test-data/definitions/create-config.yaml (about) 1 apiVersion: core.oam.dev/v1beta1 2 kind: WorkflowStepDefinition 3 metadata: 4 annotations: 5 definition.oam.dev/description: Create or update a config 6 name: create-config 7 namespace: vela-system 8 spec: 9 schematic: 10 cue: 11 template: | 12 import ( 13 "vela/op" 14 ) 15 deploy: op.#CreateConfig & { 16 name: parameter.name 17 if parameter.namespace != _|_ { 18 namespace: parameter.namespace 19 } 20 if parameter.namespace == _|_ { 21 namespace: context.namespace 22 } 23 if parameter.template != _|_ { 24 template: parameter.template 25 } 26 config: parameter.config 27 } 28 parameter: { 29 //+usage=Specify the name of the config. 30 name: string 31 //+usage=Specify the namespace of the config. 32 namespace?: string 33 //+usage=Specify the template of the config. 34 template?: string 35 //+usage=Specify the content of the config. 36 config: {...} 37 }