Workflow Step Definition
Workflow
is a further exploration and best practice based on OAM model in KubeVela, it obeys the modular concept and reusable characteristics of OAM. Each workflow module is a “super glue” that can combine your arbitrary tools and processes. In modern complex cloud native application delivery environment, you can completely describe all delivery processes through a declarative configuration, ensuring the stability and convenience of the delivery process.
Using workflow
Workflow
consists of steps, you can either use KubeVela’s [built-in workflow steps], or write their own to complete the operation.
We can use vela def
to define workflow steps by writing Cue templates
. Let’s write an Application
that apply a Tomcat using Helm chart and automatically send message to Slack when the Tomcat is running.
After this, we need two WorkflowStepDefinitions
to complete the Application:
- Apply Tomcat and wait till it’s status become running. We need to write a custom workflow step for it.
- Send Slack notifications, we can use the built-in [webhook-notification] step for it.
Step: Apply Tomcat
First, use vela def init
to generate a WorkflowStepDefinition
template:
Import vela/op
and complete the Cue code in :
Apply it to the cluster:
Step: Send Slack notifications
Use the built-in step, [webhook-notification].