This page lists every built-in workflow step type a WorkflowRun can use, sorted alphabetically. Steps that need an Application, such as deploy and apply-component, are in KubeVela's built-in step reference.
A WorkflowRun needs the WorkflowRun CRD and its controller, from the vela-workflow addon (vela addon enable vela-workflow) or the vela-workflow chart. See Run a Workflow without an Application. The chart installs every type here except check-metrics, collect-service-endpoints, depends-on-app, generate-jdbc-connection and webhook, which come with vela-core.
It was generated automatically by scripts, please don't update manually, last updated at 2026-04-16T11:50:12+01:00.
Addon-Operation
Description
Enable a KubeVela addon.
Scope
This step type is only valid in WorkflowRun.
Examples (addon-operation)
apiVersion: core.oam.dev/v1alpha1
kind: WorkflowRun
metadata:
name: observability
namespace: vela-system
spec:
context:
readConfig: true
mode:
workflowSpec:
steps:
- name: Enable Prism
type: addon-operation
properties:
addonName: vela-prism
- name: Enable o11y
type: addon-operation
properties:
addonName: o11y-definitions
operation: enable
args:
- --override-definitions
- name: Prepare Prometheus
type: step-group
subSteps:
- name: get-exist-prometheus
type: list-config
properties:
template: prometheus-server
outputs:
- name: prometheus
valueFrom: "output.configs"
- name: prometheus-server
inputs:
- from: prometheus
parameterKey: configs
if: "!context.readConfig || len(inputs.prometheus) == 0"
type: addon-operation
properties:
addonName: prometheus-server
operation: enable
args:
- memory=4096Mi
- serviceType=LoadBalancer
- name: Prepare Loki
type: addon-operation
properties:
addonName: loki
operation: enable
args:
- --version=v0.1.4
- agent=vector
- serviceType=LoadBalancer
- name: Prepare Grafana
type: step-group
subSteps:
- name: get-exist-grafana
type: list-config
properties:
template: grafana
outputs:
- name: grafana
valueFrom: "output.configs"
- name: Install Grafana & Init Dashboards
inputs:
- from: grafana
parameterKey: configs
if: "!context.readConfig || len(inputs.grafana) == 0"
type: addon-operation
properties:
addonName: grafana
operation: enable
args:
- serviceType=LoadBalancer
- name: Init Dashboards
inputs:
- from: grafana
parameterKey: configs
if: "len(inputs.grafana) != 0"
type: addon-operation
properties:
addonName: grafana
operation: enable
args:
- install=false
- name: Clean
type: clean-jobs
- name: print-message
type: print-message-in-status
properties:
message: "All addons have been enabled successfully, you can use 'vela addon list' to check them."
Specification (addon-operation)
| Name | Description | Type | Required | Default | Immutable |
|---|
| addonName | Specify the name of the addon. | string | true | | |
| args | Specify addon enable args. | []string | false | | |
| image | Specify the image. | string | false | oamdev/vela-cli:v1.7.2 | |
| operation | operation for the addon. | "enable" or "upgrade" or "disable" | false | enable | |
| serviceAccountName | specify serviceAccountName want to use. | string | false | kubevela-vela-core | |
Apply-App
Description
Apply application from data or ref to the cluster.
Scope
This step type is only valid in WorkflowRun.
Examples (apply-app)
apiVersion: core.oam.dev/v1alpha1
kind: WorkflowRun
metadata:
name: apply-applications
namespace: default
annotations:
workflowrun.oam.dev/debug: "true"
spec:
workflowSpec:
steps:
- name: check-app-exist
type: read-app
properties:
name: webservice-app
- name: apply-app1
type: apply-app
if: status["check-app-exist"].message == "Application not found"
properties:
data:
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: webservice-app
spec:
components:
- name: express-server
type: webservice
properties:
image: crccheck/hello-world
ports:
- port: 8000
- name: suspend
type: suspend
timeout: 24h
- name: apply-app2
type: apply-app
properties:
ref:
name: my-app
key: application
type: configMap
---
apiVersion: v1
kind: ConfigMap
metadata:
name: my-app
namespace: default
data:
application: |
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: webservice-app2
spec:
components:
- name: express-server2
type: webservice
properties:
image: crccheck/hello-world
ports:
- port: 8000
Specification (apply-app)
| Name | Description | Type | Required | Default | Immutable |
|---|
| data | | map[string]_ | false | | |
| ref | | ref | false | | |
ref (apply-app)
| Name | Description | Type | Required | Default | Immutable |
|---|
| name | | string | true | | |
| namespace | | | | true | | |
| type | | string | false | configMap | |
| key | | string | false | application | |
Apply-Deployment
Description
Apply deployment with specified image and cmd.
Scope
This step type is valid in both Application and WorkflowRun.
Examples (apply-deployment)
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: apply-deploy
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
workflow:
steps:
- name: apply-comp
type: apply-component
properties:
component: express-server
- name: apply-deploy
type: apply-deployment
properties:
image: nginx
Specification (apply-deployment)
| Name | Description | Type | Required | Default | Immutable |
|---|
| image | | string | true | | |
| replicas | | int | false | 1 | |
| cluster | | string | false | empty | |
| cmd | | []string | false | | |
Apply-Job
Description
Apply a Kubernetes Job and wait for it to finish. The step fails if the Job reports a failed pod.
Scope
This step type is valid in both Application and WorkflowRun.
Examples (apply-job)
apiVersion: core.oam.dev/v1alpha1
kind: WorkflowRun
metadata:
name: apply-job
namespace: default
spec:
workflowSpec:
steps:
- name: migrate
type: apply-job
properties:
value:
apiVersion: batch/v1
kind: Job
metadata:
name: migrate
namespace: default
spec:
backoffLimit: 0
template:
spec:
restartPolicy: Never
containers:
- name: migrate
image: busybox
command: ["sh", "-c", "echo migrated"]
Specification (apply-job)
| Name | Description | Type | Required | Default | Immutable |
|---|
| value | Specify Kubernetes job object to be applied. | map[string]_ | true | | |
| cluster | The cluster you want to apply the resource to, default is the current control plane cluster. | string | false | empty | |
Apply-Object
Description
Apply raw kubernetes objects for your workflow steps.
Scope
This step type is valid in both Application and WorkflowRun.
Examples (apply-object)
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: server-with-pvc
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
volumes:
- name: "my-pvc"
type: "pvc"
mountPath: "/test"
claimName: "myclaim"
workflow:
steps:
- name: apply-pvc
type: apply-object
properties:
value:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: myclaim
namespace: default
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 8Gi
storageClassName: standard
cluster: <your cluster name>
- name: apply-server
type: apply-component
properties:
component: express-serve
Specification (apply-object)
| Name | Description | Type | Required | Default | Immutable |
|---|
| value | Specify Kubernetes native resource object to be applied. | map[string]_ | true | | |
| cluster | The cluster you want to apply the resource to, default is the current control plane cluster. | string | false | empty | |
Description
Apply terraform configuration in the step.
Scope
This step type is valid in both Application and WorkflowRun.
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: apply-terraform-resource
namespace: default
spec:
components: []
workflow:
steps:
- name: provider
type: apply-terraform-provider
properties:
type: alibaba
name: my-alibaba-provider
accessKey: <accessKey>
secretKey: <secretKey>
region: cn-hangzhou
- name: configuration
type: apply-terraform-config
properties:
source:
path: alibaba/cs/dedicated-kubernetes
remote: https://github.com/FogDong/terraform-modules
providerRef:
name: my-alibaba-provider
writeConnectionSecretToRef:
name: my-terraform-secret
namespace: vela-system
variable:
name: regular-check-ack
new_nat_gateway: true
vpc_name: "tf-k8s-vpc-regular-check"
vpc_cidr: "10.0.0.0/8"
vswitch_name_prefix: "tf-k8s-vsw-regualr-check"
vswitch_cidrs: [ "10.1.0.0/16", "10.2.0.0/16", "10.3.0.0/16" ]
k8s_name_prefix: "tf-k8s-regular-check"
k8s_version: 1.24.6-aliyun.1
k8s_pod_cidr: "192.168.5.0/24"
k8s_service_cidr: "192.168.2.0/24"
k8s_worker_number: 2
cpu_core_count: 4
memory_size: 8
tags:
created_by: "Terraform-of-KubeVela"
created_from: "module-tf-alicloud-ecs-instance"
| Name | Description | Type | Required | Default | Immutable |
|---|
| source | specify the source of the terraform configuration. | type-option-1 or type-option-2 | true | | |
| deleteResource | whether to delete resource. | bool | false | true | |
| variable | the variable in the configuration. | map[string]_ | true | | |
| writeConnectionSecretToRef | this specifies the namespace and name of a secret to which any connection details for this managed resource should be written. | writeConnectionSecretToRef | false | | |
| providerRef | providerRef specifies the reference to Provider. | providerRef | false | | |
| region | region is cloud provider's region. It will override the region in the region field of providerRef. | string | false | | |
| jobEnv | the envs for job. | map[string]_ | false | | |
| forceDelete | forceDelete will force delete Configuration no matter which state it is or whether it has provisioned some resources. | bool | false | false | |
| Name | Description | Type | Required | Default | Immutable |
|---|
| hcl | directly specify the hcl of the terraform configuration. | string | true | | |
| Name | Description | Type | Required | Default | Immutable |
|---|
| name | | string | true | | |
| namespace | | | | true | | |
| Name | Description | Type | Required | Default | Immutable |
|---|
| name | | string | true | | |
| namespace | | | | true | | |
Description
Apply terraform provider config.
Scope
This step type is valid in both Application and WorkflowRun.
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: apply-terraform-provider
namespace: default
spec:
components: []
workflow:
steps:
- name: provider
type: apply-terraform-provider
properties:
type: alibaba
name: my-alibaba-provider
accessKey: <accessKey>
secretKey: <secretKey>
region: cn-hangzhou
| Name | Description | Type | Required | Default | Immutable |
|---|
| accessKey | | string | true | | |
| secretKey | | string | true | | |
| region | | string | true | | |
| type | | string | true | | |
| name | | string | false | alibaba-provider | |
| Name | Description | Type | Required | Default | Immutable |
|---|
| accessKey | | string | true | | |
| secretKey | | string | true | | |
| region | | string | true | | |
| token | | string | false | empty | |
| type | | string | true | | |
| name | | string | false | aws-provider | |
| Name | Description | Type | Required | Default | Immutable |
|---|
| subscriptionID | | string | true | | |
| tenantID | | string | true | | |
| clientID | | string | true | | |
| clientSecret | | string | true | | |
| name | | string | false | azure-provider | |
| Name | Description | Type | Required | Default | Immutable |
|---|
| accessKey | | string | true | | |
| secretKey | | string | true | | |
| region | | string | true | | |
| type | | string | true | | |
| name | | string | false | baidu-provider | |
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| apiKey | | string | false | empty | |
| name | | string | false | ec-provider | |
| Name | Description | Type | Required | Default | Immutable |
|---|
| credentials | | string | true | | |
| region | | string | true | | |
| project | | string | true | | |
| type | | string | true | | |
| name | | string | false | gcp-provider | |
| Name | Description | Type | Required | Default | Immutable |
|---|
| secretID | | string | true | | |
| secretKey | | string | true | | |
| region | | string | true | | |
| type | | string | true | | |
| name | | string | false | tencent-provider | |
| Name | Description | Type | Required | Default | Immutable |
|---|
| publicKey | | string | true | | |
| privateKey | | string | true | | |
| projectID | | string | true | | |
| region | | string | true | | |
| type | | string | true | | |
| name | | string | false | ucloud-provider | |
Build-Push-Image
Description
Build and push image from git url.
Scope
This step type is valid in both Application and WorkflowRun.
Examples (build-push-image)
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: build-push-image
namespace: default
spec:
components:
- name: my-web
type: webservice
properties:
image: fogdong/simple-web-demo:v1
ports:
- port: 80
expose: true
workflow:
steps:
- name: create-git-secret
type: export2secret
properties:
secretName: git-secret
data:
token: <git token>
- name: create-image-secret
type: export2secret
properties:
secretName: image-secret
kind: docker-registry
dockerRegistry:
username: <docker username>
password: <docker password>
- name: build-push
type: build-push-image
properties:
context:
git: github.com/FogDong/simple-web-demo
branch: main
image: fogdong/simple-web-demo:v1
credentials:
image:
name: image-secret
- name: apply-comp
type: apply-component
properties:
component: my-web
Specification (build-push-image)
| Name | Description | Type | Required | Default | Immutable |
|---|
| kanikoExecutor | Specify the kaniko executor image, default to oamdev/kaniko-executor:v1.9.1. | string | false | oamdev/kaniko-executor:v1.9.1 | |
| context | Specify the context to build image, you can use context with git and branch or directly specify the context, please refer to https://github.com/GoogleContainerTools/kaniko#kaniko-build-contexts. | string | true | | |
| dockerfile | Specify the dockerfile. | string | false | ./Dockerfile | |
| image | Specify the image. | string | true | | |
| platform | Specify the platform to build. | string | false | | |
| buildArgs | Specify the build args. | []string | false | | |
| credentials | Specify the credentials to access git and image registry. | credentials | false | | |
| verbosity | Specify the verbosity level. | "info" or "panic" or "fatal" or "error" or "warn" or "debug" or "trace" | false | info | |
credentials (build-push-image)
| Name | Description | Type | Required | Default | Immutable |
|---|
| git | Specify the credentials to access git. | git | false | | |
| image | Specify the credentials to access image registry. | image | false | | |
git (build-push-image)
| Name | Description | Type | Required | Default | Immutable |
|---|
| name | Specify the secret name. | string | true | | |
| key | Specify the secret key. | string | true | | |
image (build-push-image)
| Name | Description | Type | Required | Default | Immutable |
|---|
| name | Specify the secret name. | string | true | | |
| key | Specify the secret key. | string | false | .dockerconfigjson | |
Chat-Gpt
Description
Send request to chat-gpt.
Scope
This step type is valid in both Application and WorkflowRun.
Examples (chat-gpt)
apiVersion: core.oam.dev/v1alpha1
kind: WorkflowRun
metadata:
name: chat-gpt
namespace: default
spec:
workflowSpec:
steps:
- name: apply
type: apply-deployment
timeout: 3s
outputs:
- name: resource
valueFrom: output.value
properties:
image: invalid
- name: chat-diagnose
if: status.apply.failed
type: chat-gpt
inputs:
- from: resource
parameterKey: prompt.content
properties:
token:
value: <your token>
prompt:
type: diagnose
- name: chat-audit
if: status.apply.succeeded
type: chat-gpt
inputs:
- from: resource
parameterKey: prompt.content
properties:
token:
secretRef:
name: chat-gpt-token-secret
key: token
prompt:
type: audit
lang: Chinese
Specification (chat-gpt)
| Name | Description | Type | Required | Default | Immutable |
|---|
| token | | type-option-1 or type-option-2 | true | | |
| model | the model name. | string | false | gpt-3.5-turbo | |
| prompt | the prompt to use. | prompt | true | | |
| timeout | | string | false | 30s | |
type-option-1 (chat-gpt)
| Name | Description | Type | Required | Default | Immutable |
|---|
| value | the token value. | string | true | | |
type-option-2 (chat-gpt)
| Name | Description | Type | Required | Default | Immutable |
|---|
| secretRef | | secretRef | true | | |
secretRef (chat-gpt)
| Name | Description | Type | Required | Default | Immutable |
|---|
| name | name is the name of the secret. | string | true | | |
| key | key is the token key in the secret. | string | true | | |
prompt (chat-gpt)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | "custom" or "diagnose" or "audit" or "quality-gate" | false | custom | |
| lang | | "English" or "Chinese" | false | English | |
| content | | string | true | | |
Check-Metrics
Description
Verify application's metrics.
Scope
This step type comes with vela-core, not the vela-workflow chart. A WorkflowRun can use it only on a cluster where KubeVela is installed, in the namespace the controller reads definitions from (vela-system by default); elsewhere the step fails because its definition isn't found.
Examples (check-metrics)
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: canary-demo
annotations:
app.oam.dev/publishVersion: v2
spec:
components:
- name: canary-demo
type: webservice
properties:
image: wangyikewyk/canarydemo:v2
ports:
- port: 8090
traits:
- type: scaler
properties:
replicas: 5
- type: gateway
properties:
domain: canary-demo.com
http:
"/version": 8090
workflow:
steps:
- name: 200-status-percent-2-phase
type: check-metrics
timeout: 3m
properties:
query: sum(irate(nginx_ingress_controller_requests{host="canary-demo.com",status="200"}[5m]))/sum(irate(nginx_ingress_controller_requests{host="canary-demo.com"}[2m]))
promAddress: "http://prometheus-server.o11y-system.svc:9090"
condition: ">=0.95"
duration: 2m
Specification (check-metrics)
| Name | Description | Type | Required | Default | Immutable |
|---|
| query | Query is a raw prometheus query to perform. | string | true | | |
| metricEndpoint | The HTTP address and port of the prometheus server. | string | false | | |
| condition | Condition is an expression which determines if a measurement is considered successful. eg: >=0.95. | string | true | | |
| duration | Duration defines the duration of time required for this step to be considered successful. | string | false | 5m | |
| failDuration | FailDuration is the duration of time that, if the check fails, will result in the step being marked as failed. | string | false | 2m | |
Clean-Jobs
Description
clean applied jobs in the cluster.
Scope
This step type is valid in both Application and WorkflowRun.
Examples (clean-jobs)
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: clean-jobs
namespace: default
spec:
components: []
workflow:
steps:
- name: clean-cli-jobs
type: clean-jobs
properties:
labelselector:
"my-label": my-value
Specification (clean-jobs)
| Name | Description | Type | Required | Default | Immutable |
|---|
| labelselector | | map[string]_ | false | | |
| namespace | | | | true | | |
Collect-Service-Endpoints
Description
Collect service endpoints for the application.
Scope
This step type comes with vela-core, not the vela-workflow chart. A WorkflowRun can use it only on a cluster where KubeVela is installed, in the namespace the controller reads definitions from (vela-system by default); elsewhere the step fails because its definition isn't found.
Examples (collect-service-endpoints)
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: app-collect-service-endpoint-and-export
spec:
components:
- type: webservice
name: busybox
properties:
image: busybox
imagePullPolicy: IfNotPresent
cmd:
- sleep
- '1000000'
traits:
- type: expose
properties:
port: [8080]
type: ClusterIP
policies:
- type: topology
name: local
properties:
clusters: ["local"]
- type: topology
name: all
properties:
clusters: ["local", "cluster-worker"]
workflow:
steps:
- type: deploy
name: deploy
properties:
policies: ["local"]
- type: collect-service-endpoints
name: collect-service-endpoints
outputs:
- name: host
valueFrom: value.endpoint.host
- type: export-data
name: export-data
properties:
topology: all
inputs:
- from: host
parameterKey: data.host
Specification (collect-service-endpoints)
| Name | Description | Type | Required | Default | Immutable |
|---|
| name | Specify the name of the application. | string | true | | |
| namespace | Specify the namespace of the application. | | | true | | |
| components | Filter the component of the endpoints. | []string | false | | |
| port | Filter the port of the endpoints. | int | false | | |
| portName | Filter the port name of the endpoints. | string | false | | |
| outer | Filter the endpoint that are only outer. | bool | false | | |
| protocal | The protocal of endpoint url. | "http" or "https" | false | http | |
Create-Config
Description
Create or update a config.
Scope
This step type is valid in both Application and WorkflowRun.
Examples (create-config)
kind: Application
apiVersion: core.oam.dev/v1beta1
metadata:
name: test-config
namespace: "config-e2e-test"
spec:
components: []
workflow:
steps:
- name: write-config
type: create-config
properties:
name: test
config:
key1: value1
key2: 2
key3: true
key4:
key5: value5
- name: read-config
type: read-config
properties:
name: test
outputs:
- fromKey: config
name: read-config
- name: delete-config
type: delete-config
properties:
name: test
Specification (create-config)
| Name | Description | Type | Required | Default | Immutable |
|---|
| name | Specify the name of the config. | string | true | | |
| namespace | Specify the namespace of the config. | | | true | | |
| template | Specify the template of the config. | string | false | | |
| config | Specify the content of the config. | map[string]_ | true | | |
Delete-Config
Description
Delete a config.
Scope
This step type is valid in both Application and WorkflowRun.
Examples (delete-config)
kind: Application
apiVersion: core.oam.dev/v1beta1
metadata:
name: test-config
namespace: "config-e2e-test"
spec:
components: []
workflow:
steps:
- name: write-config
type: create-config
properties:
name: test
config:
key1: value1
key2: 2
key3: true
key4:
key5: value5
- name: delete-config
type: delete-config
properties:
name: test
Specification (delete-config)
| Name | Description | Type | Required | Default | Immutable |
|---|
| name | Specify the name of the config. | string | true | | |
| namespace | Specify the namespace of the config. | | | true | | |
Depends-On-App
Description
Wait for the specified Application to complete.
Scope
This step type comes with vela-core, not the vela-workflow chart. A WorkflowRun can use it only on a cluster where KubeVela is installed, in the namespace the controller reads definitions from (vela-system by default); elsewhere the step fails because its definition isn't found.
Examples (depends-on-app)
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: first-vela-workflow
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
traits:
- type: ingress
properties:
domain: testsvc.example.com
http:
/: 8000
workflow:
steps:
- name: express-server
type: depends-on-app
properties:
name: another-app
namespace: default
depends-on-app will check if the cluster has the application with name and namespace given in properties.
If the application exists, it will hang the next step until the application is running.
If the application does not exist, KubeVela will check the ConfigMap with the same name, and read the config of the Application and apply to cluster.
The ConfigMap is like below: the name and namespace of the ConfigMap is the same in properties.
In data, the key must be specified by application, and the value is the yaml of the deployed application yaml.
apiVersion: v1
kind: ConfigMap
metadata:
name: myapp
namespace: vela-system
data:
application:
<app yaml file>
Specification (depends-on-app)
| Name | Description | Type | Required | Default | Immutable |
|---|
| name | Specify the name of the dependent Application. | string | true | | |
| namespace | Specify the namespace of the dependent Application. | string | true | | |
Export2config
Description
Export data to specified Kubernetes ConfigMap in your workflow.
Scope
This step type is valid in both Application and WorkflowRun.
Examples (export2config)
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: export2config
namespace: default
spec:
components:
- name: export2config-demo-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
workflow:
steps:
- name: apply-server
type: apply-component
outputs:
- name: status
valueFrom: output.status.conditions[0].message
properties:
component: export2config-demo-server
- name: export-config
type: export2config
inputs:
- from: status
parameterKey: data.serverstatus
properties:
configName: my-configmap
data:
testkey: |
testvalue
value-line-2
Specification (export2config)
| Name | Description | Type | Required | Default | Immutable |
|---|
| configName | Specify the name of the config map. | string | true | | |
| namespace | Specify the namespace of the config map. | string | false | | |
| data | Specify the data of config map. | struct | true | | |
| cluster | Specify the cluster of the config map. | string | false | empty | |
Export2secret
Description
Export data to Kubernetes Secret in your workflow.
Scope
This step type is valid in both Application and WorkflowRun.
Examples (export2secret)
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: export-secret
namespace: default
spec:
components:
- name: express-server-sec
type: webservice
properties:
image: oamdev/hello-world
port: 8000
workflow:
steps:
- name: apply-server
type: apply-component
outputs:
- name: status
valueFrom: output.status.conditions[0].message
properties:
component: express-server-sec
- name: export-secret
type: export2secret
inputs:
- from: status
parameterKey: data.serverstatus
properties:
secretName: my-secret
data:
testkey: |
testvalue
value-line-2
Specification (export2secret)
| Name | Description | Type | Required | Default | Immutable |
|---|
| secretName | Specify the name of the secret. | string | true | | |
| namespace | Specify the namespace of the secret. | string | false | | |
| type | Specify the type of the secret. | string | false | | |
| data | Specify the data of secret. | struct | true | | |
| cluster | Specify the cluster of the secret. | string | false | empty | |
| kind | Specify the kind of the secret. | "generic" or "docker-registry" | false | generic | |
| dockerRegistry | Specify the docker data. | dockerRegistry | false | | |
dockerRegistry (export2secret)
| Name | Description | Type | Required | Default | Immutable |
|---|
| username | Specify the username of the docker registry. | string | true | | |
| password | Specify the password of the docker registry. | string | true | | |
| server | Specify the server of the docker registry. | string | false | https://index.docker.io/v1/ | |
Generate-Jdbc-Connection
Description
Generate a JDBC connection based on Component of alibaba-rds.
Scope
This step type comes with vela-core, not the vela-workflow chart. A WorkflowRun can use it only on a cluster where KubeVela is installed, in the namespace the controller reads definitions from (vela-system by default); elsewhere the step fails because its definition isn't found.
Examples (generate-jdbc-connection)
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: jdbc
spec:
components:
- name: db
type: alibaba-rds
properties:
instance_name: favorite-links
database_name: db1
account_name: oamtest
password: U34rfwefwefffaked
security_ips: [ "0.0.0.0/0" ]
privilege: ReadWrite
writeConnectionSecretToRef:
name: db-conn
- name: express-server
type: webservice
properties:
image: crccheck/hello-world
port: 8000
workflow:
steps:
- name: jdbc
type: generate-jdbc-connection
outputs:
- name: jdbc
valueFrom: jdbc
properties:
name: db-conn
namespace: default
- name: apply
type: apply-component
inputs:
- from: jdbc
parameterKey: env
properties:
component: express-server
Specification (generate-jdbc-connection)
| Name | Description | Type | Required | Default | Immutable |
|---|
| name | Specify the name of the secret generated by database component. | string | true | | |
| namespace | Specify the namespace of the secret generated by database component. | string | false | | |
List-Config
Description
List the configs.
Scope
This step type is valid in both Application and WorkflowRun.
Examples (list-config)
apiVersion: core.oam.dev/v1alpha1
kind: WorkflowRun
metadata:
name: observability
namespace: vela-system
spec:
context:
readConfig: true
mode:
workflowSpec:
steps:
- name: Enable Prism
type: addon-operation
properties:
addonName: vela-prism
- name: Enable o11y
type: addon-operation
properties:
addonName: o11y-definitions
operation: enable
args:
- --override-definitions
- name: Prepare Prometheus
type: step-group
subSteps:
- name: get-exist-prometheus
type: list-config
properties:
template: prometheus-server
outputs:
- name: prometheus
valueFrom: "output.configs"
- name: prometheus-server
inputs:
- from: prometheus
parameterKey: configs
if: "!context.readConfig || len(inputs.prometheus) == 0"
type: addon-operation
properties:
addonName: prometheus-server
operation: enable
args:
- memory=4096Mi
- serviceType=LoadBalancer
Specification (list-config)
| Name | Description | Type | Required | Default | Immutable |
|---|
| template | Specify the template of the config. | string | true | | |
| namespace | Specify the namespace of the config. | | | true | | |
Notification
Description
Send notifications to Email, DingTalk, Slack, Lark or webhook in your workflow.
Scope
This step type is valid in both Application and WorkflowRun.
Examples (notification)
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: first-vela-workflow
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
traits:
- type: ingress
properties:
domain: testsvc.example.com
http:
/: 8000
workflow:
steps:
- name: dingtalk-message
type: notification
properties:
dingding:
url:
value: <url>
message:
msgtype: text
text:
content: Workflow starting...
- name: application
type: apply-application
- name: slack-message
type: notification
properties:
slack:
url:
secretRef:
name: <secret-key>
key: <secret-value>
message:
text: Workflow ended.
lark:
url:
value: <lark-url>
message:
msg_type: "text"
content: "{\"text\":\" Hello KubeVela\"}"
email:
from:
address: <sender-email-address>
alias: <sender-alias>
password:
value: <sender-password>
host: <email host like smtp.gmail.com>
port: <email port, optional, default to 587>
to:
- kubevela1@gmail.com
- kubevela2@gmail.com
content:
subject: test-subject
body: test-body
Expected outcome
We can see that before and after the deployment of the application, the messages can be seen in the corresponding group chat.
Specification (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| lark | Please fulfill its url and message if you want to send Lark messages. | lark | false | | |
| dingding | Please fulfill its url and message if you want to send DingTalk messages. | dingding | false | | |
| slack | Please fulfill its url and message if you want to send Slack messages. | slack | false | | |
| email | Please fulfill its from, to and content if you want to send email. | email | false | | |
lark (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| url | Specify the the lark url, you can either sepcify it in value or use secretRef. | type-option-1 or type-option-2 | true | | |
| message | Specify the message that you want to sent, refer to Lark messaging. | message | true | | |
type-option-1 (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| value | the url address content in string. | string | true | | |
type-option-2 (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| secretRef | | secretRef | true | | |
secretRef (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| name | name is the name of the secret. | string | true | | |
| key | key is the key in the secret. | string | true | | |
message (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| msg_type | msg_type can be text, post, image, interactive, share_chat, share_user, audio, media, file, sticker. | string | true | | |
| content | content should be json encode string. | string | true | | |
dingding (notification)
type-option-1 (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| value | the url address content in string. | string | true | | |
type-option-2 (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| secretRef | | secretRef | true | | |
secretRef (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| name | name is the name of the secret. | string | true | | |
| key | key is the key in the secret. | string | true | | |
message (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| text | Specify the message content of dingtalk notification. | text | false | | |
| msgtype | msgType can be text, link, mardown, actionCard, feedCard. | "text" or "link" or "markdown" or "actionCard" or "feedCard" | false | text | |
| link | | link | false | | |
| markdown | | markdown | false | | |
| at | | at | false | | |
| actionCard | | actionCard | false | | |
| feedCard | | feedCard | false | | |
text (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| content | | string | true | | |
link (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| text | | string | false | | |
| title | | string | false | | |
| messageUrl | | string | false | | |
| picUrl | | string | false | | |
markdown (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| text | | string | true | | |
| title | | string | true | | |
at (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| atMobiles | | []string | false | | |
| isAtAll | | bool | false | | |
actionCard (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| text | | string | true | | |
| title | | string | true | | |
| hideAvatar | | string | true | | |
| btnOrientation | | string | true | | |
| singleTitle | | string | true | | |
| singleURL | | string | true | | |
| btns | | []btns | false | | |
btns (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| title | | string | true | | |
| actionURL | | string | true | | |
feedCard (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| links | | []links | true | | |
links (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| text | | string | false | | |
| title | | string | false | | |
| messageUrl | | string | false | | |
| picUrl | | string | false | | |
slack (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| url | Specify the the slack url, you can either sepcify it in value or use secretRef. | type-option-1 or type-option-2 | true | | |
| message | Specify the message that you want to sent, refer to slack messaging. | message | true | | |
type-option-1 (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| value | the url address content in string. | string | true | | |
type-option-2 (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| secretRef | | secretRef | true | | |
secretRef (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| name | name is the name of the secret. | string | true | | |
| key | key is the key in the secret. | string | true | | |
message (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| text | Specify the message text for slack notification. | string | true | | |
| blocks | | []blocks | false | | |
| attachments | | attachments | false | | |
| thread_ts | | string | false | | |
| mrkdwn | Specify the message text format in markdown for slack notification. | bool | false | true | |
blocks (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| block_id | | string | false | | |
| elements | | []elements | false | | |
elements (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| action_id | | string | false | | |
| url | | string | false | | |
| value | | string | false | | |
| style | | string | false | | |
| text | | text | false | | |
| confirm | | confirm | false | | |
| options | | []options | false | | |
| initial_options | | []initial_options | false | | |
| placeholder | | placeholder | false | | |
| initial_date | | string | false | | |
| image_url | | string | false | | |
| alt_text | | string | false | | |
| option_groups | | []option_groups | false | | |
| max_selected_items | | int | false | | |
| initial_value | | string | false | | |
| multiline | | bool | false | | |
| min_length | | int | false | | |
| max_length | | int | false | | |
| dispatch_action_config | | dispatch_action_config | false | | |
| initial_time | | string | false | | |
text (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| text | | string | true | | |
| emoji | | bool | false | | |
| verbatim | | bool | false | | |
confirm (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| title | | title | true | | |
| text | | text | true | | |
| confirm | | confirm | true | | |
| deny | | deny | true | | |
| style | | string | false | | |
title (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| text | | string | true | | |
| emoji | | bool | false | | |
| verbatim | | bool | false | | |
text (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| text | | string | true | | |
| emoji | | bool | false | | |
| verbatim | | bool | false | | |
confirm (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| text | | string | true | | |
| emoji | | bool | false | | |
| verbatim | | bool | false | | |
deny (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| text | | string | true | | |
| emoji | | bool | false | | |
| verbatim | | bool | false | | |
options (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| text | | text | true | | |
| value | | string | true | | |
| description | | description | false | | |
| url | | string | false | | |
text (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| text | | string | true | | |
| emoji | | bool | false | | |
| verbatim | | bool | false | | |
description (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| text | | string | true | | |
| emoji | | bool | false | | |
| verbatim | | bool | false | | |
initial_options (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| text | | text | true | | |
| value | | string | true | | |
| description | | description | false | | |
| url | | string | false | | |
text (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| text | | string | true | | |
| emoji | | bool | false | | |
| verbatim | | bool | false | | |
description (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| text | | string | true | | |
| emoji | | bool | false | | |
| verbatim | | bool | false | | |
placeholder (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| text | | string | true | | |
| emoji | | bool | false | | |
| verbatim | | bool | false | | |
option_groups (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| text | | text | true | | |
| value | | string | true | | |
| description | | description | false | | |
| url | | string | false | | |
text (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| text | | string | true | | |
| emoji | | bool | false | | |
| verbatim | | bool | false | | |
description (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| text | | string | true | | |
| emoji | | bool | false | | |
| verbatim | | bool | false | | |
dispatch_action_config (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| trigger_actions_on | | []string | false | | |
attachments (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| blocks | | []blocks | false | | |
| color | | string | false | | |
blocks (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| block_id | | string | false | | |
| elements | | []elements | false | | |
elements (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| action_id | | string | false | | |
| url | | string | false | | |
| value | | string | false | | |
| style | | string | false | | |
| text | | text | false | | |
| confirm | | confirm | false | | |
| options | | []options | false | | |
| initial_options | | []initial_options | false | | |
| placeholder | | placeholder | false | | |
| initial_date | | string | false | | |
| image_url | | string | false | | |
| alt_text | | string | false | | |
| option_groups | | []option_groups | false | | |
| max_selected_items | | int | false | | |
| initial_value | | string | false | | |
| multiline | | bool | false | | |
| min_length | | int | false | | |
| max_length | | int | false | | |
| dispatch_action_config | | dispatch_action_config | false | | |
| initial_time | | string | false | | |
text (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| text | | string | true | | |
| emoji | | bool | false | | |
| verbatim | | bool | false | | |
confirm (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| title | | title | true | | |
| text | | text | true | | |
| confirm | | confirm | true | | |
| deny | | deny | true | | |
| style | | string | false | | |
title (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| text | | string | true | | |
| emoji | | bool | false | | |
| verbatim | | bool | false | | |
text (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| text | | string | true | | |
| emoji | | bool | false | | |
| verbatim | | bool | false | | |
confirm (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| text | | string | true | | |
| emoji | | bool | false | | |
| verbatim | | bool | false | | |
deny (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| text | | string | true | | |
| emoji | | bool | false | | |
| verbatim | | bool | false | | |
options (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| text | | text | true | | |
| value | | string | true | | |
| description | | description | false | | |
| url | | string | false | | |
text (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| text | | string | true | | |
| emoji | | bool | false | | |
| verbatim | | bool | false | | |
description (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| text | | string | true | | |
| emoji | | bool | false | | |
| verbatim | | bool | false | | |
initial_options (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| text | | text | true | | |
| value | | string | true | | |
| description | | description | false | | |
| url | | string | false | | |
text (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| text | | string | true | | |
| emoji | | bool | false | | |
| verbatim | | bool | false | | |
description (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| text | | string | true | | |
| emoji | | bool | false | | |
| verbatim | | bool | false | | |
placeholder (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| text | | string | true | | |
| emoji | | bool | false | | |
| verbatim | | bool | false | | |
option_groups (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| text | | text | true | | |
| value | | string | true | | |
| description | | description | false | | |
| url | | string | false | | |
text (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| text | | string | true | | |
| emoji | | bool | false | | |
| verbatim | | bool | false | | |
description (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| type | | string | true | | |
| text | | string | true | | |
| emoji | | bool | false | | |
| verbatim | | bool | false | | |
dispatch_action_config (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| trigger_actions_on | | []string | false | | |
email (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| from | Specify the email info that you want to send from. | from | true | | |
| to | Specify the email address that you want to send to. | []string | true | | |
| content | Specify the content of the email. | content | true | | |
from (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| address | Specify the email address that you want to send from. | string | true | | |
| alias | The alias is the email alias to show after sending the email. | string | false | | |
| password | Specify the password of the email, you can either sepcify it in value or use secretRef. | type-option-1 or type-option-2 | true | | |
| host | Specify the host of your email. | string | true | | |
| port | Specify the port of the email host, default to 587. | int | false | 587 | |
type-option-1 (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| value | the password content in string. | string | true | | |
type-option-2 (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| secretRef | | secretRef | true | | |
secretRef (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| name | name is the name of the secret. | string | true | | |
| key | key is the key in the secret. | string | true | | |
content (notification)
| Name | Description | Type | Required | Default | Immutable |
|---|
| subject | Specify the subject of the email. | string | true | | |
| body | Specify the context body of the email. | string | true | | |
Print-Message-In-Status
Description
print message in workflow step status.
Scope
This step type is valid in both Application and WorkflowRun.
Examples (print-message-in-status)
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: print-message-in-status
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
workflow:
steps:
- name: express-server
type: apply-component
properties:
component: express-server
- name: message
type: print-message-in-status
properties:
message: "All addons have been enabled successfully, you can use 'vela addon list' to check them."
Specification (print-message-in-status)
| Name | Description | Type | Required | Default | Immutable |
|---|
| message | | string | true | | |
Read-App
Description
Read application from the cluster.
Scope
This step type is only valid in WorkflowRun.
Examples (read-app)
apiVersion: core.oam.dev/v1alpha1
kind: WorkflowRun
metadata:
name: apply-applications
namespace: default
annotations:
workflowrun.oam.dev/debug: "true"
spec:
workflowSpec:
steps:
- name: check-app-exist
type: read-app
properties:
name: webservice-app
- name: apply-app1
type: apply-app
if: status["check-app-exist"].message == "Application not found"
properties:
data:
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: webservice-app
spec:
components:
- name: express-server
type: webservice
properties:
image: crccheck/hello-world
ports:
- port: 8000
- name: suspend
type: suspend
timeout: 24h
- name: apply-app2
type: apply-app
properties:
ref:
name: my-app
key: application
type: configMap
---
apiVersion: v1
kind: ConfigMap
metadata:
name: my-app
namespace: default
data:
application: |
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: webservice-app2
spec:
components:
- name: express-server2
type: webservice
properties:
image: crccheck/hello-world
ports:
- port: 8000
Specification (read-app)
| Name | Description | Type | Required | Default | Immutable |
|---|
| name | | string | true | | |
| namespace | | | | true | | |
Read-Config
Description
Read a config.
Scope
This step type is valid in both Application and WorkflowRun.
Examples (read-config)
kind: Application
apiVersion: core.oam.dev/v1beta1
metadata:
name: test-config
namespace: "config-e2e-test"
spec:
components: []
workflow:
steps:
- name: read-config
type: read-config
properties:
name: test
outputs:
- fromKey: config
name: read-config
Specification (read-config)
| Name | Description | Type | Required | Default | Immutable |
|---|
| name | Specify the name of the config. | string | true | | |
| namespace | Specify the namespace of the config. | | | true | | |
Read-Object
Description
Read Kubernetes objects from cluster for your workflow steps.
Scope
This step type is valid in both Application and WorkflowRun.
Examples (read-object)
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: read-object
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
workflow:
steps:
- name: read-object
type: read-object
outputs:
- name: cpu
valueFrom: output.value.data["cpu"]
- name: memory
valueFrom: output.value.data["memory"]
properties:
apiVersion: v1
kind: ConfigMap
name: my-cm-name
cluster: <your cluster name
- name: apply
type: apply-component
inputs:
- from: cpu
parameterKey: cpu
- from: memory
parameterKey: memory
properties:
component: express-server
Specification (read-object)
| Name | Description | Type | Required | Default | Immutable |
|---|
| apiVersion | Specify the apiVersion of the object, defaults to 'core.oam.dev/v1beta1'. | string | false | core.oam.dev/v1beta1 | |
| kind | Specify the kind of the object, defaults to Application. | string | false | Application | |
| name | Specify the name of the object. | string | true | | |
| namespace | The namespace of the resource you want to read. | string | false | default | |
| cluster | The cluster you want to apply the resource to, default is the current control plane cluster. | string | false | empty | |
Request
Description
Send request to the url.
Scope
This step type is valid in both Application and WorkflowRun.
Examples (request)
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: request-http
namespace: default
spec:
components: []
workflow:
steps:
- name: request
type: request
properties:
url: https://api.github.com/repos/kubevela/workflow
outputs:
- name: stars
valueFrom: |
import "strconv"
"Current star count: " + strconv.FormatInt(response["stargazers_count"], 10)
- name: notification
type: notification
inputs:
- from: stars
parameterKey: slack.message.text
properties:
slack:
url:
value: <your slack url>
- name: failed-notification
type: notification
if: status.request.failed
properties:
slack:
url:
value: <your slack url>
message:
text: "Failed to request github"
Specification (request)
| Name | Description | Type | Required | Default | Immutable |
|---|
| url | | string | true | | |
| method | | "GET" or "POST" or "PUT" or "DELETE" | false | GET | |
| body | | map[string]_ | false | | |
| header | | map[string]string | false | | |
Step-Group
Description
A special step that you can declare 'subSteps' in it, 'subSteps' is an array containing any step type whose valid parameters do not include the step-group step type itself. The sub steps were executed in parallel.
Scope
This step type is valid in both Application and WorkflowRun.
Examples (step-group)
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: example
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: crccheck/hello-world
port: 8000
- name: express-server2
type: webservice
properties:
image: crccheck/hello-world
port: 8000
workflow:
steps:
- name: step
type: step-group
subSteps:
- name: apply-sub-step1
type: apply-component
properties:
component: express-server
- name: apply-sub-step2
type: apply-component
properties:
component: express-server2
Specification (step-group)
This capability has no arguments.
Suspend
Description
Suspend the current workflow, it can be resumed by 'vela workflow resume' command.
Scope
This step type is valid in both Application and WorkflowRun.
Examples (suspend)
The duration parameter is supported in KubeVela v1.4 or higher.
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: first-vela-workflow
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
workflow:
steps:
- name: slack-message
type: notification
properties:
slack:
url:
value: <your-slack-url>
message:
text: Ready to apply the application, ask the administrator to approve and resume the workflow.
- name: manual-approval
type: suspend
- name: express-server
type: apply-component
properties:
component: express-server
Specification (suspend)
| Name | Description | Type | Required | Default | Immutable |
|---|
| duration | Specify the wait duration time to resume workflow such as "30s", "1min" or "2m15s". | string | false | | |
| message | The suspend message to show. | string | false | | |
Vela-Cli
Description
Run a vela command.
Scope
This step type is valid in both Application and WorkflowRun.
Examples (vela-cli)
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: vela-cli
namespace: default
spec:
components: []
workflow:
steps:
- name: list-app
type: vela-cli
properties:
command:
- vela
- ls
Specification (vela-cli)
| Name | Description | Type | Required | Default | Immutable |
|---|
| command | Specify the vela command. | []string | true | | |
| image | Specify the image. | string | false | oamdev/vela-cli:v1.6.4 | |
| serviceAccountName | specify serviceAccountName want to use. | string | false | kubevela-vela-core | |
| storage | | storage | false | | |
storage (vela-cli)
| Name | Description | Type | Required | Default | Immutable |
|---|
| secret | Mount Secret type storage. | []secret | false | | |
| hostPath | Declare host path type storage. | []hostPath | false | | |
secret (vela-cli)
| Name | Description | Type | Required | Default | Immutable |
|---|
| name | | string | true | | |
| mountPath | | string | true | | |
| subPath | | string | false | | |
| defaultMode | | int | false | 420 | |
| secretName | | string | true | | |
| items | | []items | false | | |
items (vela-cli)
| Name | Description | Type | Required | Default | Immutable |
|---|
| key | | string | true | | |
| path | | string | true | | |
| mode | | int | false | 511 | |
hostPath (vela-cli)
| Name | Description | Type | Required | Default | Immutable |
|---|
| name | | string | true | | |
| path | | string | true | | |
| mountPath | | string | true | | |
| type | | "Directory" or "DirectoryOrCreate" or "FileOrCreate" or "File" or "Socket" or "CharDevice" or "BlockDevice" | false | Directory | |
Webhook
Description
Send a POST request to the specified Webhook URL. If no request body is specified, the current Application body will be sent by default.
Scope
This step type comes with vela-core, not the vela-workflow chart. A WorkflowRun can use it only on a cluster where KubeVela is installed, in the namespace the controller reads definitions from (vela-system by default); elsewhere the step fails because its definition isn't found.
Examples (webhook)
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: first-vela-workflow
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
workflow:
steps:
- name: express-server
type: apply-application
- name: webhook
type: webhook
properties:
url:
value: <your webhook url>
Specification (webhook)
| Name | Description | Type | Required | Default | Immutable |
|---|
| url | Specify the webhook url. | type-option-1 or type-option-2 | true | | |
| data | Specify the data you want to send. | map[string]_ | false | | |
type-option-1 (webhook)
| Name | Description | Type | Required | Default | Immutable |
|---|
| value | | string | true | | |
type-option-2 (webhook)
| Name | Description | Type | Required | Default | Immutable |
|---|
| secretRef | | secretRef | true | | |
secretRef (webhook)
| Name | Description | Type | Required | Default | Immutable |
|---|
| name | name is the name of the secret. | string | true | | |
| key | key is the key in the secret. | string | true | | |