Fix: fix output doc

Signed-off-by: FogDong <dongtianxin.tx@alibaba-inc.com>
This commit is contained in:
FogDong 2022-09-28 20:40:29 +08:00
parent 50af65dc57
commit bffcfc6702
14 changed files with 98 additions and 42 deletions

View File

@ -115,9 +115,13 @@ In KubeVela, we can use inputs and outputs in Components to pass data.
Outputs is made of `name` and `valueFrom`. Input will use `name` to reference output.
We can write `valueFrom` in the following ways:
1. Fill string value in the field, eg. `valueFrom: testString`.
2. Use expression, eg. `valueFrom: output.metadata.name`. Note that `output` is a built-in field referring to the resource in the component that is rendered and deployed to the cluster.
3. Use `+` to combine above two ways, the computed value will be the result, eg. `valueFrom: output.metadata.name + "testString"`.
1. Use value expression, eg. `valueFrom: output.metadata.name`. Note that `output` is a built-in field referring to the resource in the component that is rendered and deployed to the cluster.
2. Use CUE expressions, eg. use `+` to combine value and string: `valueFrom: output.metadata.name + "testString"` or you can import built-in packages in CUE like:
```
valueFrom: |
import "strings"
strings.Join(["1","2"], ",")
```
### Inputs

View File

@ -10,9 +10,13 @@ Outputs consists of `name` and `valueFrom`. `name` declares the name of this out
`valueFrom` can be written in the following ways:
1. Fill string value in the field, eg. `valueFrom: "testString"`.
2. Use CUE expression, eg. `valueFrom: output.value.status.workflow.message`. Note that `output.value.status.workflow.message` will use the value of the variable from the CUE template of the current step. If this field does not exist in the CUE template of the step, the resulting value will be empty.
3. Use `+` to combine above two ways, the computed value will be the result, eg. `valueFrom: output.value.status.workflow.message + "testString"`.
1. Use value expression, eg. `valueFrom: output.value.status.workflow.message`. Note that `output.value.status.workflow.message` will use the value of the variable from the CUE template of the current step. If this field does not exist in the CUE template of the step, the resulting value will be empty.
2. Use CUE expressions, eg. use `+` to combine value and string: `valueFrom: output.metadata.name + "testString"` or you can import built-in packages in CUE like:
```
valueFrom: |
import "strings"
strings.Join(["1","2"], ",")
```
## Inputs

View File

@ -115,9 +115,13 @@ mysql mysql-secret raw running healthy 2021-10-14 12:09:55 +0
outputs 由 `name``valueFrom` 组成。`name` 声明了这个 output 的名称,在 input 中将通过 `from` 引用 output。
`valueFrom` 有以下几种写法:
1. 直接通过字符串表示值,如:`valueFrom: testString`。
2. 通过表达式来指定值,如:`valueFrom: output.metadata.name`。注意,`output` 为固定内置字段,指向组件中被部署在集群里的资源。
3. 通过 `+` 来任意连接以上两种写法,最终值是计算后的字符串拼接结果,如:`valueFrom: output.metadata.name + "testString"`。
1. 通过指定 value 来指定值,如:`valueFrom: output.metadata.name`。注意,`output` 为固定内置字段,指向组件中被部署在集群里的资源。
2. 使用 CUE 表达式。如,用 `+` 来连接值和字符串: `valueFrom: output.metadata.name + "testString"`。你也可以引入 CUE 的内置包:
```
valueFrom: |
import "strings"
strings.Join(["1","2"], ",")
```
### Inputs

View File

@ -9,9 +9,13 @@ title: 数据传递
outputs 由 `name``valueFrom` 组成。`name` 声明了这个 output 的名称,在 input 中将通过 `from` 引用 output。
`valueFrom` 有以下几种写法:
1. 直接通过字符串表示值,如:`valueFrom: "testString"`。
2. 通过 CUE 表达式来指定值,如:`valueFrom: output.value.status.workflow.message`。注意,`output.value.status.workflow.message` 将使用变量引用的方式从当前步骤的 CUE 模板中取值,如果该步骤的 CUE 模板中没有该字段,那么得到的值为空。
3. 通过 `+` 来任意连接以上两种写法,最终值是计算后的字符串拼接结果,如:`valueFrom: output.value.status.workflow.message + "testString"`。
1. 通过指定 value 来指定值,如:`valueFrom: output.value.status.workflow.message`。注意,`output.value.status.workflow.message` 将使用变量引用的方式从当前步骤的 CUE 模板中取值,如果该步骤的 CUE 模板中没有该字段,那么得到的值为空。
2. 使用 CUE 表达式。如,用 `+` 来连接值和字符串: `valueFrom: output.metadata.name + "testString"`。你也可以引入 CUE 的内置包:
```
valueFrom: |
import "strings"
strings.Join(["1","2"], ",")
```
## Inputs

View File

@ -115,9 +115,13 @@ mysql mysql-secret raw running healthy 2021-10-14 12:09:55 +0
outputs 由 `name``valueFrom` 组成。`name` 声明了这个 output 的名称,在 input 中将通过 `name` 引用 output。
`valueFrom` 有以下几种写法:
1. 直接通过字符串表示值,如:`valueFrom: testString`。
2. 通过表达式来指定值,如:`valueFrom: output.metadata.name`。注意,`output` 为固定内置字段,指向组件中被部署在集群里的资源。
3. 通过 `+` 来任意连接以上两种写法,最终值是计算后的字符串拼接结果,如:`valueFrom: output.metadata.name + "testString"`。
1. 通过指定 value 来指定值,如:`valueFrom: output.metadata.name`。注意,`output` 为固定内置字段,指向组件中被部署在集群里的资源。
2. 使用 CUE 表达式。如,用 `+` 来连接值和字符串: `valueFrom: output.metadata.name + "testString"`。你也可以引入 CUE 的内置包:
```
valueFrom: |
import "strings"
strings.Join(["1","2"], ",")
```
### Inputs

View File

@ -115,9 +115,13 @@ mysql mysql-secret raw running healthy 2021-10-14 12:09:55 +0
outputs 由 `name``valueFrom` 组成。`name` 声明了这个 output 的名称,在 input 中将通过 `from` 引用 output。
`valueFrom` 有以下几种写法:
1. 直接通过字符串表示值,如:`valueFrom: testString`。
2. 通过表达式来指定值,如:`valueFrom: output.metadata.name`。注意,`output` 为固定内置字段,指向组件中被部署在集群里的资源。
3. 通过 `+` 来任意连接以上两种写法,最终值是计算后的字符串拼接结果,如:`valueFrom: output.metadata.name + "testString"`。
1. 通过指定 value 来指定值,如:`valueFrom: output.metadata.name`。注意,`output` 为固定内置字段,指向组件中被部署在集群里的资源。
2. 使用 CUE 表达式。如,用 `+` 来连接值和字符串: `valueFrom: output.metadata.name + "testString"`。你也可以引入 CUE 的内置包:
```
valueFrom: |
import "strings"
strings.Join(["1","2"], ",")
```
### Inputs

View File

@ -9,9 +9,13 @@ title: 数据传递
outputs 由 `name``valueFrom` 组成。`name` 声明了这个 output 的名称,在 input 中将通过 `from` 引用 output。
`valueFrom` 有以下几种写法:
1. 直接通过字符串表示值,如:`valueFrom: "testString"`。
2. 通过 CUE 表达式来指定值,如:`valueFrom: output.value.status.workflow.message`。注意,`output.value.status.workflow.message` 将使用变量引用的方式从当前步骤的 CUE 模板中取值,如果该步骤的 CUE 模板中没有该字段,那么得到的值为空。
3. 通过 `+` 来任意连接以上两种写法,最终值是计算后的字符串拼接结果,如:`valueFrom: output.value.status.workflow.message + "testString"`。
1. 通过指定 value 来指定值,如:`valueFrom: output.value.status.workflow.message`。注意,`output.value.status.workflow.message` 将使用变量引用的方式从当前步骤的 CUE 模板中取值,如果该步骤的 CUE 模板中没有该字段,那么得到的值为空。
2. 使用 CUE 表达式。如,用 `+` 来连接值和字符串: `valueFrom: output.metadata.name + "testString"`。你也可以引入 CUE 的内置包:
```
valueFrom: |
import "strings"
strings.Join(["1","2"], ",")
```
## Inputs

View File

@ -115,9 +115,13 @@ mysql mysql-secret raw running healthy 2021-10-14 12:09:55 +0
outputs 由 `name``valueFrom` 组成。`name` 声明了这个 output 的名称,在 input 中将通过 `from` 引用 output。
`valueFrom` 有以下几种写法:
1. 直接通过字符串表示值,如:`valueFrom: testString`。
2. 通过表达式来指定值,如:`valueFrom: output.metadata.name`。注意,`output` 为固定内置字段,指向组件中被部署在集群里的资源。
3. 通过 `+` 来任意连接以上两种写法,最终值是计算后的字符串拼接结果,如:`valueFrom: output.metadata.name + "testString"`。
1. 通过指定 value 来指定值,如:`valueFrom: output.metadata.name`。注意,`output` 为固定内置字段,指向组件中被部署在集群里的资源。
2. 使用 CUE 表达式。如,用 `+` 来连接值和字符串: `valueFrom: output.metadata.name + "testString"`。你也可以引入 CUE 的内置包:
```
valueFrom: |
import "strings"
strings.Join(["1","2"], ",")
```
### Inputs

View File

@ -9,9 +9,13 @@ title: 数据传递
outputs 由 `name``valueFrom` 组成。`name` 声明了这个 output 的名称,在 input 中将通过 `from` 引用 output。
`valueFrom` 有以下几种写法:
1. 直接通过字符串表示值,如:`valueFrom: "testString"`。
2. 通过 CUE 表达式来指定值,如:`valueFrom: output.value.status.workflow.message`。注意,`output.value.status.workflow.message` 将使用变量引用的方式从当前步骤的 CUE 模板中取值,如果该步骤的 CUE 模板中没有该字段,那么得到的值为空。
3. 通过 `+` 来任意连接以上两种写法,最终值是计算后的字符串拼接结果,如:`valueFrom: output.value.status.workflow.message + "testString"`。
1. 通过指定 value 来指定值,如:`valueFrom: output.value.status.workflow.message`。注意,`output.value.status.workflow.message` 将使用变量引用的方式从当前步骤的 CUE 模板中取值,如果该步骤的 CUE 模板中没有该字段,那么得到的值为空。
2. 使用 CUE 表达式。如,用 `+` 来连接值和字符串: `valueFrom: output.metadata.name + "testString"`。你也可以引入 CUE 的内置包:
```
valueFrom: |
import "strings"
strings.Join(["1","2"], ",")
```
## Inputs

View File

@ -115,9 +115,13 @@ In KubeVela, we can use inputs and outputs in Components to pass data.
Outputs is made of `name` and `valueFrom`. Input will use `name` to reference output.
We can write `valueFrom` in the following ways:
1. Fill string value in the field, eg. `valueFrom: testString`.
2. Use expression, eg. `valueFrom: output.metadata.name`. Note that `output` is a built-in field referring to the resource in the component that is rendered and deployed to the cluster.
3. Use `+` to combine above two ways, the computed value will be the result, eg. `valueFrom: output.metadata.name + "testString"`.
1. Use value expression, eg. `valueFrom: output.metadata.name`. Note that `output` is a built-in field referring to the resource in the component that is rendered and deployed to the cluster.
2. Use CUE expressions, eg. use `+` to combine value and string: `valueFrom: output.metadata.name + "testString"` or you can import built-in packages in CUE like:
```
valueFrom: |
import "strings"
strings.Join(["1","2"], ",")
```
### Inputs

View File

@ -115,9 +115,13 @@ In KubeVela, we can use inputs and outputs in Components to pass data.
Outputs is made of `name` and `valueFrom`. Input will use `name` to reference output.
We can write `valueFrom` in the following ways:
1. Fill string value in the field, eg. `valueFrom: testString`.
2. Use expression, eg. `valueFrom: output.metadata.name`. Note that `output` is a built-in field referring to the resource in the component that is rendered and deployed to the cluster.
3. Use `+` to combine above two ways, the computed value will be the result, eg. `valueFrom: output.metadata.name + "testString"`.
1. Use value expression, eg. `valueFrom: output.metadata.name`. Note that `output` is a built-in field referring to the resource in the component that is rendered and deployed to the cluster.
2. Use CUE expressions, eg. use `+` to combine value and string: `valueFrom: output.metadata.name + "testString"` or you can import built-in packages in CUE like:
```
valueFrom: |
import "strings"
strings.Join(["1","2"], ",")
```
### Inputs

View File

@ -10,9 +10,13 @@ Outputs consists of `name` and `valueFrom`. `name` declares the name of this out
`valueFrom` can be written in the following ways:
1. Fill string value in the field, eg. `valueFrom: "testString"`.
2. Use CUE expression, eg. `valueFrom: output.value.status.workflow.message`. Note that `output.value.status.workflow.message` will use the value of the variable from the CUE template of the current step. If this field does not exist in the CUE template of the step, the resulting value will be empty.
3. Use `+` to combine above two ways, the computed value will be the result, eg. `valueFrom: output.value.status.workflow.message + "testString"`.
1. Use value expression, eg. `valueFrom: output.value.status.workflow.message`. Note that `output.value.status.workflow.message` will use the value of the variable from the CUE template of the current step. If this field does not exist in the CUE template of the step, the resulting value will be empty.
2. Use CUE expressions, eg. use `+` to combine value and string: `valueFrom: output.metadata.name + "testString"` or you can import built-in packages in CUE like:
```
valueFrom: |
import "strings"
strings.Join(["1","2"], ",")
```
## Inputs

View File

@ -115,9 +115,13 @@ In KubeVela, we can use inputs and outputs in Components to pass data.
Outputs is made of `name` and `valueFrom`. Input will use `name` to reference output.
We can write `valueFrom` in the following ways:
1. Fill string value in the field, eg. `valueFrom: testString`.
2. Use expression, eg. `valueFrom: output.metadata.name`. Note that `output` is a built-in field referring to the resource in the component that is rendered and deployed to the cluster.
3. Use `+` to combine above two ways, the computed value will be the result, eg. `valueFrom: output.metadata.name + "testString"`.
1. Use value expression, eg. `valueFrom: output.metadata.name`. Note that `output` is a built-in field referring to the resource in the component that is rendered and deployed to the cluster.
2. Use CUE expressions, eg. use `+` to combine value and string: `valueFrom: output.metadata.name + "testString"` or you can import built-in packages in CUE like:
```
valueFrom: |
import "strings"
strings.Join(["1","2"], ",")
```
### Inputs

View File

@ -10,9 +10,13 @@ Outputs consists of `name` and `valueFrom`. `name` declares the name of this out
`valueFrom` can be written in the following ways:
1. Fill string value in the field, eg. `valueFrom: "testString"`.
2. Use CUE expression, eg. `valueFrom: output.value.status.workflow.message`. Note that `output.value.status.workflow.message` will use the value of the variable from the CUE template of the current step. If this field does not exist in the CUE template of the step, the resulting value will be empty.
3. Use `+` to combine above two ways, the computed value will be the result, eg. `valueFrom: output.value.status.workflow.message + "testString"`.
1. Use value expression, eg. `valueFrom: output.value.status.workflow.message`. Note that `output.value.status.workflow.message` will use the value of the variable from the CUE template of the current step. If this field does not exist in the CUE template of the step, the resulting value will be empty.
2. Use CUE expressions, eg. use `+` to combine value and string: `valueFrom: output.metadata.name + "testString"` or you can import built-in packages in CUE like:
```
valueFrom: |
import "strings"
strings.Join(["1","2"], ",")
```
## Inputs