Fix(workflow): add workflow status check in end user examples (#190)
This commit is contained in:
parent
33fb5cf491
commit
0009b58cab
|
@ -82,6 +82,37 @@ first-vela-workflow express-server webservice running true
|
|||
```
|
||||
## Expected outcome
|
||||
|
||||
Check the `Application` status:
|
||||
|
||||
```shell
|
||||
kubectl get application first-vela-workflow -o yaml
|
||||
```
|
||||
|
||||
All the step status in workflow is succeeded:
|
||||
|
||||
```yaml
|
||||
...
|
||||
status:
|
||||
workflow:
|
||||
...
|
||||
stepIndex: 3
|
||||
steps:
|
||||
- name: express-server
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: apply-component
|
||||
- name: manual-approval
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: suspend
|
||||
- name: nginx-server
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: apply-component
|
||||
suspend: false
|
||||
terminated: true
|
||||
```
|
||||
|
||||
Check the component status in cluster:
|
||||
|
||||
```shell
|
||||
|
|
|
@ -69,13 +69,40 @@ spec:
|
|||
|
||||
## Expected outcome
|
||||
|
||||
Check the `Application` status:
|
||||
|
||||
```shell
|
||||
kubectl get application first-vela-workflow -o yaml
|
||||
```
|
||||
|
||||
We can see that the workflow is suspended at `manual-approval`:
|
||||
|
||||
```yaml
|
||||
...
|
||||
status:
|
||||
workflow:
|
||||
...
|
||||
stepIndex: 2
|
||||
steps:
|
||||
- name: first-server
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: apply-component
|
||||
- name: manual-approval
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: suspend
|
||||
suspend: true
|
||||
terminated: false
|
||||
```
|
||||
|
||||
Check the component status in cluster and resume the workflow after the component is running:
|
||||
|
||||
```shell
|
||||
$ kubectl get deployment
|
||||
|
||||
NAME READY UP-TO-DATE AVAILABLE AGE
|
||||
express-server 0/1 1 0 5s
|
||||
express-server 1/1 1 1 5s
|
||||
|
||||
$ kubectl get ingress
|
||||
|
||||
|
@ -89,6 +116,37 @@ Resume the workflow:
|
|||
vela workflow resume first-vela-workflow
|
||||
```
|
||||
|
||||
Recheck the `Application` status:
|
||||
|
||||
```shell
|
||||
kubectl get application first-vela-workflow -o yaml
|
||||
```
|
||||
|
||||
All the step status in workflow is succeeded:
|
||||
|
||||
```yaml
|
||||
...
|
||||
status:
|
||||
workflow:
|
||||
...
|
||||
stepIndex: 3
|
||||
steps:
|
||||
- name: first-server
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: apply-component
|
||||
- name: manual-approval
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: suspend
|
||||
- name: remaining-server
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: apply-remaining
|
||||
suspend: false
|
||||
terminated: true
|
||||
```
|
||||
|
||||
Recheck the component status:
|
||||
|
||||
```shell
|
||||
|
|
|
@ -88,7 +88,34 @@ spec:
|
|||
|
||||
## Expected outcome
|
||||
|
||||
First, check the component status in `test` cluster:
|
||||
Check the `Application` status:
|
||||
|
||||
```shell
|
||||
kubectl get application multi-env-demo -o yaml
|
||||
```
|
||||
|
||||
We can see that the workflow is suspended at `manual-approval`:
|
||||
|
||||
```yaml
|
||||
...
|
||||
status:
|
||||
workflow:
|
||||
...
|
||||
stepIndex: 2
|
||||
steps:
|
||||
- name: deploy-test-server
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: multi-env
|
||||
- name: manual-approval
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: suspend
|
||||
suspend: true
|
||||
terminated: false
|
||||
```
|
||||
|
||||
Switch to `test` cluster and check the component status:
|
||||
|
||||
```shell
|
||||
$ kubectl get deployment
|
||||
|
@ -100,10 +127,40 @@ nginx-server 1/1 1 1 1m10s
|
|||
Use `resume` command after everything is ok in test cluster:
|
||||
|
||||
```shell
|
||||
$ kubectl get deployment
|
||||
$ vela workflow resume multi-env-demo
|
||||
|
||||
NAME READY UP-TO-DATE AVAILABLE AGE
|
||||
nginx-server 1/1 1 1 1m10s
|
||||
Successfully resume workflow: multi-env-demo
|
||||
```
|
||||
|
||||
Recheck the `Application` status:
|
||||
|
||||
```shell
|
||||
kubectl get application multi-env-demo -o yaml
|
||||
```
|
||||
|
||||
All the step status in workflow is succeeded:
|
||||
|
||||
```yaml
|
||||
...
|
||||
status:
|
||||
workflow:
|
||||
...
|
||||
stepIndex: 3
|
||||
steps:
|
||||
- name: deploy-test-server
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: multi-env
|
||||
- name: manual-approval
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: suspend
|
||||
- name: deploy-prod-server
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: multi-env
|
||||
suspend: false
|
||||
terminated: true
|
||||
```
|
||||
|
||||
Then, check the component status in `prod` cluster:
|
||||
|
|
|
@ -83,7 +83,38 @@ first-vela-workflow express-server webservice running true
|
|||
|
||||
## 期望结果
|
||||
|
||||
查看集群中组件的状态:
|
||||
查看应用的状态:
|
||||
|
||||
```shell
|
||||
kubectl get application first-vela-workflow -o yaml
|
||||
```
|
||||
|
||||
所有步骤的状态均已成功:
|
||||
|
||||
```yaml
|
||||
...
|
||||
status:
|
||||
workflow:
|
||||
...
|
||||
stepIndex: 3
|
||||
steps:
|
||||
- name: express-server
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: apply-component
|
||||
- name: manual-approval
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: suspend
|
||||
- name: nginx-server
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: apply-component
|
||||
suspend: false
|
||||
terminated: true
|
||||
```
|
||||
|
||||
确认集群中组件的状态:
|
||||
|
||||
```shell
|
||||
$ kubectl get deployment
|
||||
|
|
|
@ -68,13 +68,40 @@ spec:
|
|||
|
||||
## 期望结果
|
||||
|
||||
查看此时应用的状态:
|
||||
|
||||
```shell
|
||||
kubectl get application first-vela-workflow -o yaml
|
||||
```
|
||||
|
||||
可以看到执行到了 `manual-approval` 步骤时,工作流被暂停执行了:
|
||||
|
||||
```yaml
|
||||
...
|
||||
status:
|
||||
workflow:
|
||||
...
|
||||
stepIndex: 2
|
||||
steps:
|
||||
- name: first-server
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: apply-component
|
||||
- name: manual-approval
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: suspend
|
||||
suspend: true
|
||||
terminated: false
|
||||
```
|
||||
|
||||
查看集群中组件的状态,当组件运行成功后,再继续工作流:
|
||||
|
||||
```shell
|
||||
$ kubectl get deployment
|
||||
|
||||
NAME READY UP-TO-DATE AVAILABLE AGE
|
||||
express-server 0/1 1 0 5s
|
||||
express-server 1/1 1 1 5s
|
||||
|
||||
$ kubectl get ingress
|
||||
|
||||
|
@ -88,6 +115,37 @@ express-server <none> testsvc.example.com 80 47s
|
|||
vela workflow resume first-vela-workflow
|
||||
```
|
||||
|
||||
重新查看应用的状态:
|
||||
|
||||
```shell
|
||||
kubectl get application first-vela-workflow -o yaml
|
||||
```
|
||||
|
||||
可以看到所有步骤的状态均已成功:
|
||||
|
||||
```yaml
|
||||
...
|
||||
status:
|
||||
workflow:
|
||||
...
|
||||
stepIndex: 3
|
||||
steps:
|
||||
- name: first-server
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: apply-component
|
||||
- name: manual-approval
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: suspend
|
||||
- name: remaining-server
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: apply-remaining
|
||||
suspend: false
|
||||
terminated: true
|
||||
```
|
||||
|
||||
重新查看集群中组件的状态:
|
||||
|
||||
```shell
|
||||
|
|
|
@ -89,7 +89,34 @@ spec:
|
|||
|
||||
## 期望结果
|
||||
|
||||
首先在 `test` 集群中,查看应用的状态:
|
||||
查看此时应用的状态:
|
||||
|
||||
```shell
|
||||
kubectl get application multi-env-demo -o yaml
|
||||
```
|
||||
|
||||
可以看到执行到了 `manual-approval` 步骤时,工作流被暂停执行了:
|
||||
|
||||
```yaml
|
||||
...
|
||||
status:
|
||||
workflow:
|
||||
...
|
||||
stepIndex: 2
|
||||
steps:
|
||||
- name: deploy-test-server
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: multi-env
|
||||
- name: manual-approval
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: suspend
|
||||
suspend: true
|
||||
terminated: false
|
||||
```
|
||||
|
||||
切换到 `test` 集群,并查看应用的状态:
|
||||
|
||||
```shell
|
||||
$ kubectl get deployment
|
||||
|
@ -101,10 +128,40 @@ nginx-server 1/1 1 1 1m10s
|
|||
测试集群的应用一切正常后,使用命令继续工作流:
|
||||
|
||||
```shell
|
||||
$ kubectl get deployment
|
||||
$ vela workflow resume multi-env-demo
|
||||
|
||||
NAME READY UP-TO-DATE AVAILABLE AGE
|
||||
nginx-server 1/1 1 1 1m10s
|
||||
Successfully resume workflow: multi-env-demo
|
||||
```
|
||||
|
||||
重新查看应用的状态:
|
||||
|
||||
```shell
|
||||
kubectl get application multi-env-demo -o yaml
|
||||
```
|
||||
|
||||
可以看到所有步骤的状态均已成功:
|
||||
|
||||
```yaml
|
||||
...
|
||||
status:
|
||||
workflow:
|
||||
...
|
||||
stepIndex: 3
|
||||
steps:
|
||||
- name: deploy-test-server
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: multi-env
|
||||
- name: manual-approval
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: suspend
|
||||
- name: deploy-prod-server
|
||||
phase: succeeded
|
||||
resourceRef: {}
|
||||
type: multi-env
|
||||
suspend: false
|
||||
terminated: true
|
||||
```
|
||||
|
||||
在 `prod` 集群中,查看应用的状态:
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 198 KiB After Width: | Height: | Size: 266 KiB |
Loading…
Reference in New Issue