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:

    1. $ vela status timeout-example
    2. About:
    3. Name: timeout-example
    4. Namespace: default
    5. Created at: 2022-06-25 00:51:43 +0800 CST
    6. Status: workflowTerminated
    7. Workflow:
    8. mode: StepByStep
    9. finished: true
    10. Terminated: true
    11. Steps
    12. - id:1f58n13qdp
    13. name:apply-comp1
    14. type:apply-component
    15. phase:succeeded
    16. message:
    17. - id:1pfije4ugt
    18. name:suspend
    19. type:suspend
    20. phase:failed
    21. name:apply-comp2
    22. type:apply-component
    23. phase:skipped
    24. message:
    25. Services:
    26. - Name: comp1
    27. Cluster: local Namespace: default
    28. Type: webservice
    29. Healthy Ready:1/1
    30. 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.