github.com/oam-dev/kubevela@v1.9.11/docs/examples/workflow/app-with-timeout/README.md (about)

     1  # Timeout steps
     2  
     3  Every step can specify a `timeout`, if the timeout expires and the step has not succeeded, the step will fail with the reason `Timeout`.
     4  
     5  Here is an example:
     6  
     7  ```yaml
     8  apiVersion: core.oam.dev/v1beta1
     9  kind: Application
    10  metadata:
    11    name: app-with-timeout
    12    namespace: default
    13  spec:
    14    components:
    15    - name: comp
    16      type: webservice
    17      properties:
    18        image: crccheck/hello-world
    19        port: 8000
    20      traits:
    21      - type: scaler
    22        properties:
    23          replicas: 10
    24    workflow:
    25      steps:
    26      - name: apply
    27        timeout: 1m
    28        type: apply-component
    29        properties:
    30          component: comp
    31      - name: suspend
    32        type: suspend
    33        timeout: 5s
    34  ```
    35  
    36  If the first step is succeeded in the time of `1m`, the second step will be executed. If the second step is not resumed in the time of `5s`, the suspend step will be failed with the reason `Timeout`, and the application will end up with the status of `WorkflowTerminated` like:
    37  
    38  ```yaml
    39  status:
    40    status: workflowTerminated
    41    workflow:
    42      ...
    43      finished: true
    44      message: Terminated
    45      mode: StepByStep
    46      steps:
    47      - firstExecuteTime: "2022-06-22T09:19:42Z"
    48        id: gdcwh929ih
    49        lastExecuteTime: "2022-06-22T09:20:08Z"
    50        name: apply
    51        phase: succeeded
    52        type: apply-component
    53      - firstExecuteTime: "2022-06-22T09:20:08Z"
    54        id: rloz8axnju
    55        lastExecuteTime: "2022-06-22T09:20:13Z"
    56        name: suspend
    57        phase: failed
    58        reason: Timeout
    59        type: suspend
    60      suspend: false
    61      terminated: true
    62  ```