github.com/kubevela/workflow@v0.6.0/charts/vela-workflow/templates/definitions/read-app.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-app.cue 3 apiVersion: core.oam.dev/v1beta1 4 kind: WorkflowStepDefinition 5 metadata: 6 annotations: 7 definition.oam.dev/alias: "" 8 definition.oam.dev/description: Read application from the cluster 9 definition.oam.dev/example-url: https://raw.githubusercontent.com/kubevela/workflow/main/examples/workflow-run/apply-applications.yaml 10 labels: 11 custom.definition.oam.dev/scope: WorkflowRun 12 name: read-app 13 namespace: {{ include "systemDefinitionNamespace" . }} 14 spec: 15 schematic: 16 cue: 17 template: | 18 import ( 19 "vela/op" 20 "encoding/yaml" 21 "strings" 22 ) 23 24 read: op.#Read & { 25 value: { 26 apiVersion: "core.oam.dev/v1beta1" 27 kind: "Application" 28 metadata: { 29 name: parameter.name 30 namespace: parameter.namespace 31 } 32 } 33 } 34 message: op.#Steps & { 35 if read.err != _|_ { 36 if strings.Contains(read.err, "not found") { 37 msg: op.#Message & { 38 message: "Application not found" 39 } 40 } 41 } 42 } 43 parameter: { 44 name: string 45 namespace: *context.namespace | string 46 } 47