Timeout of Step
You need to upgrade to version 1.5+ to use the timeout feature.
This section introduces how to add timeout to workflow steps in KubeVela.
timeout
follows the duration
format, e.g. 30s
, 1m
, etc. You can refer to Golang’s parseDuration.
If a step is not completed within the specified time, KubeVela will set the status of the step to failed
and the Reason
of the step will be set to Timeout
.
Use vela status
to check the status of the Application:
$ vela status timeout-example
About:
Name: timeout-example
Namespace: default
Created at: 2022-06-25 00:51:43 +0800 CST
Status: workflowTerminated
Workflow:
mode: StepByStep
finished: true
Terminated: true
Steps
- id:1f58n13qdp
name:apply-comp1
type:apply-component
phase:succeeded
message:
- id:1pfije4ugt
name:suspend
type:suspend
phase:failed
name:apply-comp2
type:apply-component
phase:skipped
message:
Services:
- Name: comp1
Cluster: local Namespace: default
Type: webservice
Healthy Ready:1/1
No trait applied
As you can see, when the first component is successfully deployed, the workflow is suspended on the second suspend
step. The suspend
step is set with a timeout of five seconds. If the workflow is not resumed within five seconds, the step will fail because of timeout. The third step is skipped because the previous suspend
step failed.