Update built-in workflowsteps (#875)

* Update built-in workflowsteps EN

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* update workflow step reference for location CN

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>

* Chore: update policy and components for required fields

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
This commit is contained in:
Jianbo Sun 2022-07-24 22:15:18 +08:00 committed by GitHub
parent 370f40b5b3
commit 2630ea4570
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 2957 additions and 1792 deletions

View File

@ -4,7 +4,7 @@ title: Built-in Component Type
This documentation will walk through all the built-in component types sorted alphabetically.
> It was generated automatically by [scripts](../../contributor/cli-ref-doc), please don't update manually, last updated at 2022-07-16T15:16:33+08:00.
> It was generated automatically by [scripts](../../contributor/cli-ref-doc), please don't update manually, last updated at 2022-07-24T21:02:31+08:00.
## Cron-Task
@ -38,18 +38,18 @@ spec:
cmd | Commands to run in the container. | []string | false |
env | Define arguments by using environment variables. | [[]env](#env-cron-task) | false |
schedule | Specify the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. | string | true |
concurrencyPolicy | Specifies how to treat concurrent executions of a Job. | string | true | Allow
suspend | Suspend subsequent executions. | bool | true | false
successfulJobsHistoryLimit | The number of successful finished jobs to retain. | int | true | 3
failedJobsHistoryLimit | The number of failed finished jobs to retain. | int | true | 1
concurrencyPolicy | Specifies how to treat concurrent executions of a Job. | string | false | Allow
suspend | Suspend subsequent executions. | bool | false | false
successfulJobsHistoryLimit | The number of successful finished jobs to retain. | int | false | 3
failedJobsHistoryLimit | The number of failed finished jobs to retain. | int | false | 1
startingDeadlineSeconds | Specify deadline in seconds for starting the job if it misses scheduled. | int | false |
labels | Specify the labels in the workload. | map[string]string | false |
annotations | Specify the annotations in the workload. | map[string]string | false |
count | Specify number of tasks to run in parallel. | int | true | 1
labels | Specify the labels in the workload. | map[string]:string | false |
annotations | Specify the annotations in the workload. | map[string]:string | false |
count | Specify number of tasks to run in parallel. | int | false | 1
ttlSecondsAfterFinished | Limits the lifetime of a Job that has finished. | int | false |
activeDeadlineSeconds | The duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it. | int | false |
backoffLimit | The number of retries before marking this job failed. | int | true | 6
restart | Define the job restart policy, the value can only be Never or OnFailure. By default, it's Never. | string | true | Never
backoffLimit | The number of retries before marking this job failed. | int | false | 6
restart | Define the job restart policy, the value can only be Never or OnFailure. By default, it's Never. | string | false | Never
image | Which image would you like to use for your service. | string | true |
imagePullPolicy | Specify image pull policy for your service. | string | false |
cpu | Number of CPU units for the service, like `0.5` (0.5 CPU core), `1` (1 CPU core). | string | false |
@ -118,11 +118,11 @@ spec:
exec | Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute. | [exec](#exec-cron-task) | false |
httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute. | [httpGet](#httpget-cron-task) | false |
tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute. | [tcpSocket](#tcpsocket-cron-task) | false |
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | true | 0
periodSeconds | How often, in seconds, to execute the probe. | int | true | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | true | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | true | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | true | 3
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | false | 0
periodSeconds | How often, in seconds, to execute the probe. | int | false | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | false | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | false | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | false | 3
##### exec (cron-task)
@ -163,11 +163,11 @@ spec:
exec | Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute. | [exec](#exec-cron-task) | false |
httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute. | [httpGet](#httpget-cron-task) | false |
tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute. | [tcpSocket](#tcpsocket-cron-task) | false |
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | true | 0
periodSeconds | How often, in seconds, to execute the probe. | int | true | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | true | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | true | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | true | 3
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | false | 0
periodSeconds | How often, in seconds, to execute the probe. | int | false | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | false | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | false | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | false | 3
##### exec (cron-task)
@ -266,8 +266,8 @@ spec:
cmd | Commands to run in the container. | []string | false |
env | Define arguments by using environment variables. | [[]env](#env-daemon) | false |
volumeMounts | | [volumeMounts](#volumemounts-daemon) | false |
labels | Specify the labels in the workload. | map[string]string | false |
annotations | Specify the annotations in the workload. | map[string]string | false |
labels | Specify the labels in the workload. | map[string]:string | false |
annotations | Specify the annotations in the workload. | map[string]:string | false |
image | Which image would you like to use for your service. | string | true |
ports | Which ports do you want customer traffic sent to, defaults to 80. | [[]ports](#ports-daemon) | false |
imagePullPolicy | Specify image pull policy for your service. | string | false |
@ -339,7 +339,7 @@ spec:
---- | ----------- | ---- | -------- | -------
name | | string | true |
mountPath | | string | true |
defaultMode | | int | true | 420
defaultMode | | int | false | 420
cmName | | string | true |
items | | [[]items](#items-daemon) | false |
@ -350,7 +350,7 @@ spec:
---- | ----------- | ---- | -------- | -------
path | | string | true |
key | | string | true |
mode | | int | true | 511
mode | | int | false | 511
##### secret (daemon)
@ -359,7 +359,7 @@ spec:
---- | ----------- | ---- | -------- | -------
name | | string | true |
mountPath | | string | true |
defaultMode | | int | true | 420
defaultMode | | int | false | 420
items | | [[]items](#items-daemon) | false |
secretName | | string | true |
@ -370,7 +370,7 @@ spec:
---- | ----------- | ---- | -------- | -------
path | | string | true |
key | | string | true |
mode | | int | true | 511
mode | | int | false | 511
##### emptyDir (daemon)
@ -379,7 +379,7 @@ spec:
---- | ----------- | ---- | -------- | -------
name | | string | true |
mountPath | | string | true |
medium | | string | true | empty
medium | | string | false | empty
##### hostPath (daemon)
@ -399,8 +399,8 @@ spec:
---- | ----------- | ---- | -------- | -------
name | Name of the port. | string | false |
port | Number of port to expose on the pod's IP address. | int | true |
protocol | Protocol for port. Must be UDP, TCP, or SCTP. | string | true | TCP
expose | Specify if the port should be exposed. | bool | true | false
protocol | Protocol for port. Must be UDP, TCP, or SCTP. | string | false | TCP
expose | Specify if the port should be exposed. | bool | false | false
#### volumes (daemon)
@ -419,11 +419,11 @@ spec:
exec | Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute. | [exec](#exec-daemon) | false |
httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute. | [httpGet](#httpget-daemon) | false |
tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute. | [tcpSocket](#tcpsocket-daemon) | false |
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | true | 0
periodSeconds | How often, in seconds, to execute the probe. | int | true | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | true | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | true | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | true | 3
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | false | 0
periodSeconds | How often, in seconds, to execute the probe. | int | false | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | false | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | false | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | false | 3
##### exec (daemon)
@ -466,11 +466,11 @@ spec:
exec | Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute. | [exec](#exec-daemon) | false |
httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute. | [httpGet](#httpget-daemon) | false |
tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute. | [tcpSocket](#tcpsocket-daemon) | false |
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | true | 0
periodSeconds | How often, in seconds, to execute the probe. | int | true | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | true | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | true | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | true | 3
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | false | 0
periodSeconds | How often, in seconds, to execute the probe. | int | false | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | false | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | false | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | false | 3
##### exec (daemon)
@ -583,10 +583,10 @@ spec:
---- | ----------- | ---- | -------- | -------
cmd | Commands to run in the container. | []string | false |
env | Define arguments by using environment variables. | [[]env](#env-task) | false |
count | Specify number of tasks to run in parallel. | int | true | 1
labels | Specify the labels in the workload. | map[string]string | false |
annotations | Specify the annotations in the workload. | map[string]string | false |
restart | Define the job restart policy, the value can only be Never or OnFailure. By default, it's Never. | string | true | Never
count | Specify number of tasks to run in parallel. | int | false | 1
labels | Specify the labels in the workload. | map[string]:string | false |
annotations | Specify the annotations in the workload. | map[string]:string | false |
restart | Define the job restart policy, the value can only be Never or OnFailure. By default, it's Never. | string | false | Never
image | Which image would you like to use for your service. | string | true |
imagePullPolicy | Specify image pull policy for your service. | string | false |
cpu | Number of CPU units for the service, like `0.5` (0.5 CPU core), `1` (1 CPU core). | string | false |
@ -646,11 +646,11 @@ spec:
exec | Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute. | [exec](#exec-task) | false |
httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute. | [httpGet](#httpget-task) | false |
tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute. | [tcpSocket](#tcpsocket-task) | false |
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | true | 0
periodSeconds | How often, in seconds, to execute the probe. | int | true | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | true | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | true | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | true | 3
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | false | 0
periodSeconds | How often, in seconds, to execute the probe. | int | false | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | false | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | false | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | false | 3
##### exec (task)
@ -691,11 +691,11 @@ spec:
exec | Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute. | [exec](#exec-task) | false |
httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute. | [httpGet](#httpget-task) | false |
tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute. | [tcpSocket](#tcpsocket-task) | false |
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | true | 0
periodSeconds | How often, in seconds, to execute the probe. | int | true | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | true | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | true | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | true | 3
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | false | 0
periodSeconds | How often, in seconds, to execute the probe. | int | false | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | false | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | false | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | false | 3
##### exec (task)
@ -771,8 +771,8 @@ spec:
cmd | Commands to run in the container. | []string | false |
env | Define arguments by using environment variables. | [[]env](#env-webservice) | false |
volumeMounts | | [volumeMounts](#volumemounts-webservice) | false |
labels | Specify the labels in the workload. | map[string]string | false |
annotations | Specify the annotations in the workload. | map[string]string | false |
labels | Specify the labels in the workload. | map[string]:string | false |
annotations | Specify the annotations in the workload. | map[string]:string | false |
image | Which image would you like to use for your service. | string | true |
ports | Which ports do you want customer traffic sent to, defaults to 80. | [[]ports](#ports-webservice) | false |
imagePullPolicy | Specify image pull policy for your service. | string | false |
@ -844,7 +844,7 @@ spec:
---- | ----------- | ---- | -------- | -------
name | | string | true |
mountPath | | string | true |
defaultMode | | int | true | 420
defaultMode | | int | false | 420
cmName | | string | true |
items | | [[]items](#items-webservice) | false |
@ -855,7 +855,7 @@ spec:
---- | ----------- | ---- | -------- | -------
path | | string | true |
key | | string | true |
mode | | int | true | 511
mode | | int | false | 511
##### secret (webservice)
@ -864,7 +864,7 @@ spec:
---- | ----------- | ---- | -------- | -------
name | | string | true |
mountPath | | string | true |
defaultMode | | int | true | 420
defaultMode | | int | false | 420
items | | [[]items](#items-webservice) | false |
secretName | | string | true |
@ -875,7 +875,7 @@ spec:
---- | ----------- | ---- | -------- | -------
path | | string | true |
key | | string | true |
mode | | int | true | 511
mode | | int | false | 511
##### emptyDir (webservice)
@ -884,7 +884,7 @@ spec:
---- | ----------- | ---- | -------- | -------
name | | string | true |
mountPath | | string | true |
medium | | string | true | empty
medium | | string | false | empty
##### hostPath (webservice)
@ -902,8 +902,8 @@ spec:
---- | ----------- | ---- | -------- | -------
name | Name of the port. | string | false |
port | Number of port to expose on the pod's IP address. | int | true |
protocol | Protocol for port. Must be UDP, TCP, or SCTP. | string | true | TCP
expose | Specify if the port should be exposed. | bool | true | false
protocol | Protocol for port. Must be UDP, TCP, or SCTP. | string | false | TCP
expose | Specify if the port should be exposed. | bool | false | false
#### volumes (webservice)
@ -922,11 +922,11 @@ spec:
exec | Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute. | [exec](#exec-webservice) | false |
httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute. | [httpGet](#httpget-webservice) | false |
tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute. | [tcpSocket](#tcpsocket-webservice) | false |
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | true | 0
periodSeconds | How often, in seconds, to execute the probe. | int | true | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | true | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | true | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | true | 3
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | false | 0
periodSeconds | How often, in seconds, to execute the probe. | int | false | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | false | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | false | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | false | 3
##### exec (webservice)
@ -969,11 +969,11 @@ spec:
exec | Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute. | [exec](#exec-webservice) | false |
httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute. | [httpGet](#httpget-webservice) | false |
tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute. | [tcpSocket](#tcpsocket-webservice) | false |
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | true | 0
periodSeconds | How often, in seconds, to execute the probe. | int | true | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | true | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | true | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | true | 3
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | false | 0
periodSeconds | How often, in seconds, to execute the probe. | int | false | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | false | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | false | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | false | 3
##### exec (webservice)

View File

@ -4,7 +4,7 @@ title: Built-in Policy Type
This documentation will walk through all the built-in policy types sorted alphabetically.
> It was generated automatically by [scripts](../../contributor/cli-ref-doc), please don't update manually, last updated at 2022-07-23T15:27:57+08:00.
> It was generated automatically by [scripts](../../contributor/cli-ref-doc), please don't update manually, last updated at 2022-07-24T21:01:20+08:00.
## Apply-Once
@ -14,7 +14,7 @@ Allow configuration drift for applied resources, delivery the resource without c
### Examples (apply-once)
It's generally used in [one time delivery only without continuous management](../policies/apply-once) scenario.
It's generally used in [one time delivery only without continuous management](https://kubevela.io/docs/end-user/policies/apply-once) scenario.
```yaml
apiVersion: core.oam.dev/v1beta1
@ -43,7 +43,7 @@ spec:
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
enable | Whether to enable apply-once for the whole application. | bool | true | false
enable | Whether to enable apply-once for the whole application. | bool | false | false
rules | Specify the rules for configuring apply-once policy in resource level. | [[]rules](#rules-apply-once) | false |
@ -82,7 +82,7 @@ Configure the garbage collect behaviour for the application.
### Examples (garbage-collect)
It's used in [garbage collection](../policies/gc) scenario. It can be used to configure the collection policy, e.g. don't delete the legacy resources when updating.
It's used in [garbage collection](https://kubevela.io/docs/end-user/policies/gc) scenario. It can be used to configure the collection policy, e.g. don't delete the legacy resources when updating.
```yaml
apiVersion: core.oam.dev/v1beta1
@ -140,7 +140,7 @@ spec:
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
keepLegacyResource | If is set, outdated versioned resourcetracker will not be recycled automatically, outdated resources will be kept until resourcetracker be deleted manually. | bool | true | false
keepLegacyResource | If is set, outdated versioned resourcetracker will not be recycled automatically, outdated resources will be kept until resourcetracker be deleted manually. | bool | false | false
rules | Specify the list of rules to control gc strategy at resource level, if one resource is controlled by multiple rules, first rule will be used. | [[]rules](#rules-garbage-collect) | false |
@ -149,7 +149,7 @@ spec:
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
selector | Specify how to select the targets of the rule. | [[]selector](#selector-garbage-collect) | true |
strategy | Specify the strategy for target resource to recycle. | string | true | onAppUpdate
strategy | Specify the strategy for target resource to recycle. | string | false | onAppUpdate
##### selector (garbage-collect)
@ -175,8 +175,8 @@ Apply periodical health checking to the application.
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
probeTimeout | Specify health checking timeout(seconds), default 10s. | int | true | 10
probeInterval | Specify health checking interval(seconds), default 30s. | int | true | 30
probeTimeout | Specify health checking timeout(seconds), default 10s. | int | false | 10
probeInterval | Specify health checking interval(seconds), default 30s. | int | false | 30
## Override
@ -315,7 +315,7 @@ spec:
---- | ----------- | ---- | -------- | -------
type | Specify the type of the trait to be patched. | string | true |
properties | Specify the properties to override. | map[string]:(null\|bool\|string\|bytes\|{...}\|[...]\|number) | false |
disable | Specify if the trait should be remove, default false. | bool | true | false
disable | Specify if the trait should be remove, default false. | bool | false | false
## Topology

View File

@ -1,24 +1,143 @@
---
title: Built-in Workflow Steps
title: Built-in WorkflowStep Type
---
This documentation will walk through the built-in workflow steps that you can use to design an application deployment process.
This documentation will walk through all the built-in workflow step types sorted alphabetically.
## deploy
> It was generated automatically by [scripts](../../contributor/cli-ref-doc), please don't update manually, last updated at 2022-07-24T20:59:39+08:00.
**Overview**
## Apply-Object
Deploy components with policies.
### Description
**Parameter**
Apply raw kubernetes objects for your workflow steps.
| Name | Type | Description |
| :-------: | :----: | :-----------------------------------: |
| auto | bool | Optional, default to true. If set to false, the workflow will suspend automatically before this step. |
| policies | []string | Optional, the policies that used for this deployment. If not specified, the components will be deployed to the hub cluster. |
| parallelism | int | Optional, defaults to 5. |
### Examples (apply-object)
**Example**
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: server-with-pvc
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
volumes:
- name: "my-pvc"
type: "pvc"
mountPath: "/test"
claimName: "myclaim"
workflow:
steps:
- name: apply-pvc
type: apply-object
properties:
# Kubernetes native resources fields
value:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: myclaim
namespace: default
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 8Gi
storageClassName: standard
# the cluster you want to apply the resource to, default is the current cluster
cluster: <your cluster name>
- name: apply-server
type: apply-component
properties:
component: express-serve
```
### Specification (apply-object)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
value | Specify Kubernetes native resource object to be applied. | map[string]:(null\|bool\|string\|bytes\|{...}\|[...]\|number) | true |
cluster | The cluster you want to apply the resource to, default is the current control plane cluster. | string | false | empty
## Depends-On-App
### Description
Wait for the specified Application to complete.
### Examples (depends-on-app)
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: first-vela-workflow
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
traits:
- type: ingress
properties:
domain: testsvc.example.com
http:
/: 8000
workflow:
steps:
- name: express-server
type: depends-on-app
properties:
name: another-app
namespace: default
```
`depends-on-app` will check if the cluster has the application with `name` and `namespace` given in properties.
If the application exists, it will hang the next step until the application is running.
If the application does not exist, KubeVela will check the ConfigMap with the same name, and read the config of the Application and apply to cluster.
The ConfigMap is like below: the `name` and `namespace` of the ConfigMap is the same in properties.
In data, the `key` must be specified by `application`, and the `value` is the yaml of the deployed application yaml.
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: myapp
namespace: vela-system
data:
application:
<app yaml file>
```
### Specification (depends-on-app)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
name | Specify the name of the dependent Application. | string | true |
namespace | Specify the namespace of the dependent Application. | string | true |
## Deploy
### Description
A powerful and unified deploy step for components multi-cluster delivery with policies.
### Examples (deploy)
```yaml
apiVersion: core.oam.dev/v1beta1
@ -57,29 +176,45 @@ spec:
policies: ["topology-hangzhou-clusters"]
```
## suspend
### Specification (deploy)
**Overview**
Suspend the current workflow, we can use `vela workflow resume appname` to resume the suspended workflow.
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
policies | Declare the policies that used for this deployment. If not specified, the components will be deployed to the hub cluster. | []string | false |
parallelism | Maximum number of concurrent delivered components. | int | false | 5
ignoreTerraformComponent | If set false, this step will apply the components with the terraform workload. | bool | false | true
auto | If set to false, the workflow will suspend automatically before this step, default to be true. | bool | false | true
> For more information of `vela workflow`, please refer to [vela cli](../../cli/vela_workflow)。
**Parameter**
## Deploy-Cloud-Resource
> Notice that you need to upgrade to KubeVela v1.4 or higher to use `duration` parameter.
### Description
| Name | Type | Description |
| :---: | :---: | :---------: |
| duration | string | Optional, the wait duration time to resume workflow such as "30s", "1min" or "2m15s" |
Deploy cloud resource and deliver secret to multi clusters.
**Example**
### Specification (deploy-cloud-resource)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
env | Declare the name of the env in policy. | string | true |
policy | Declare the name of the env-binding policy, if empty, the first env-binding policy will be used. | string | false | empty
## Export2config
### Description
Export data to specified Kubernetes ConfigMap in your workflow.
### Examples (export2config)
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: first-vela-workflow
name: export-config
namespace: default
spec:
components:
@ -90,59 +225,110 @@ spec:
port: 8000
workflow:
steps:
- name: slack-message
type: webhook-notification
- name: apply-server
type: apply-component
outputs:
- name: status
valueFrom: output.status.conditions[0].message
properties:
slack:
# the Slack webhook address, please refer to: https://api.slack.com/messaging/webhooks
message:
text: Ready to apply the application, ask the administrator to approve and resume the workflow.
- name: manual-approval
type: suspend
# properties:
# duration: "30s"
- name: express-server
type: apply-application
component: express-server
- name: export-config
type: export-config
inputs:
- from: status
parameterKey: data.serverstatus
properties:
configName: my-configmap
data:
testkey: testvalue
```
## notification
### Specification (export2config)
**Overview**
Send notifications. You can use the notification to send notifications to Email, DingTalk, Slack, Lark.
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
cluster | Specify the cluster of the config map. | string | false | empty
namespace | Specify the namespace of the config map. | string | false |
data | Specify the data of config map. | {...} | true |
configName | Specify the name of the config map. | string | true |
**Parameters**
| Name | Type | Description |
| :--------------: | :----: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| email | Object | Optional, please fulfill its from, to and content if you want to send email |
| email.from.address | String | Required, the email address that you want to send from |
| email.from.alias | String | Optional, the email alias to show after sending the email |
| email.from.password | ValueOrSecret | Required, the password of the email, you can either specify it in value or use secretRef |
| email.from.host | String | Required, the host of your email |
| email.from.port | Int | Optional, the port of the email host, default to 587 |
| email.to | []String | Required, the email address that you want to send to |
| email.content.subject | String | Required, the subject of the email |
| email.content.body | String | Required, the context body of the email |
| slack | Object | Optional, please fulfill its url and message if you want to send Slack messages |
| slack.url | ValueOrSecret | Required, the webhook address of Slack, you can choose to fill it directly in value or specify it in secret |
| slack.message | Object | Required, the Slack messages you want to send, please follow [Slack messaging](https://api.slack.com/reference/messaging/payload) |
| dingding | Object | Optional, please fulfill its url and message if you want to send DingTalk messages |
| dingding.url | ValueOrSecret | Required, the webhook address of DingTalk, you can choose to fill it directly in value or specify it in secret |
| dingding.message | Object | Required, the DingTalk messages you want to send, please follow [DingTalk messaging](https://developers.dingtalk.com/document/robots/custom-robot-access/title-72m-8ag-pqw) | |
| lark | Object | Optional, please fulfill its url and message if you want to send Lark messages |
| lark.url | ValueOrSecret | Required, the webhook address of Lark, you can choose to fill it directly in value or specify it in secret |
| lark.message | Object | Required, the Lark messages you want to send, please follow [Lark messaging](https://open.feishu.cn/document/ukTMukTMukTM/ucTM5YjL3ETO24yNxkjN#8b0f2a1b) | |
## Export2secret
The `ValueOrSecret` format is:
### Description
| Name | Type | Description |
| :--------------: | :----: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| value | String | Optional, directly get the data from value |
| secretRef.name | String | Optional, get data from secret, the name of the secret |
| secretRef.key | String | Optional, get data from secret, the key of the secret |
Export data to Kubernetes Secret in your workflow.
**Example**
### Examples (export2secret)
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: export-secret
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
workflow:
steps:
- name: apply-server
type: apply-component
outputs:
- name: status
valueFrom: output.status.conditions[0].message
properties:
component: express-server
- name: export-secret
type: export-secret
inputs:
- from: status
parameterKey: data.serverstatus
properties:
secretName: my-secret
data:
testkey: testvalue
```
### Specification (export2secret)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
cluster | Specify the cluster of the secret. | string | false | empty
namespace | Specify the namespace of the secret. | string | false |
type | Specify the type of the secret. | string | false |
secretName | Specify the name of the secret. | string | true |
data | Specify the data of secret. | {...} | true |
## Generate-Jdbc-Connection
### Description
Generate a JDBC connection based on Component of alibaba-rds.
### Specification (generate-jdbc-connection)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
name | Specify the name of the secret generated by database component. | string | true |
namespace | Specify the namespace of the secret generated by database component. | string | false |
## Notification
### Description
Send notifications to Email, DingTalk, Slack, Lark or webhook in your workflow.
### Examples (notification)
```yaml
apiVersion: core.oam.dev/v1beta1
@ -214,221 +400,200 @@ spec:
body: test-body
```
* Expected outcome
**Expected outcome**
we can see that before and after the deployment of the application, the messages can be seen in the corresponding group chat.
We can see that before and after the deployment of the application, the messages can be seen in the corresponding group chat.
## webhook
### Specification (notification)
**Overview**
Send a request to the specified Webhook URL. If no request body is specified, the current Application body will be sent by default.
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
lark | Please fulfill its url and message if you want to send Lark messages. | [lark](#lark-notification) | false |
slack | Please fulfill its url and message if you want to send Slack messages. | [slack](#slack-notification) | false |
email | Please fulfill its from, to and content if you want to send email. | [email](#email-notification) | false |
dingding | Please fulfill its url and message if you want to send DingTalk messages. | [dingding](#dingding-notification) | false |
**Parameter**
| Name | Type | Description |
| :-------: | :----: | :-----------------------------------: |
| url | ValueOrSecret | Required, Webhook URL to be sent, you can choose to fill in value directly or get it from secretRef |
| data | object | Optional, the data that needs to be sent |
#### lark (notification)
**Example**
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
url | Specify the the lark url, you can either sepcify it in value or use secretRef. | [url-option-0](#url-option-0-notification) or [url-option-1](#url-option-1-notification) | true |
message | Specify the message that you want to sent, refer to [Lark messaging](https://open.feishu.cn/document/ukTMukTMukTM/ucTM5YjL3ETO24yNxkjN#8b0f2a1b). | [message](#message-notification) | true |
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: first-vela-workflow
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
workflow:
steps:
- name: express-server
type: apply-application
- name: webhook
type: webhook
properties:
url:
value: <your webhook url>
```
## apply-application
##### url-option-0 (notification)
**Overview**
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
value | the url address content in string. | string | true |
Apply all components and traits in Application.
**Parameter**
##### url-option-1 (notification)
No arguments, used for custom steps before or after application applied.
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
secretRef | | [secretRef](#secretref-notification) | true |
**Example**
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: first-vela-workflow
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
traits:
- type: ingress
properties:
domain: testsvc.example.com
http:
/: 8000
workflow:
steps:
- name: express-server
type: apply-application
```
##### secretRef (notification)
## depends-on-app
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
name | name is the name of the secret. | string | true |
key | key is the key in the secret. | string | true |
**Overview**
Wait for the specified Application to complete.
##### message (notification)
> `depends-on-app` will check if the cluster has the application with `name` and `namespace` defines in `properties`.
> If the application exists, the next step will be executed after the application is running.
> If the application do not exists, KubeVela will check the ConfigMap with the same name, and read the config of the Application and apply to cluster.
> The ConfigMap is like below: the `name` and `namespace` of the ConfigMap is the same in properties. In data, the key is `name`, and the value is the yaml of the deployed application yaml.
> ```yaml
> apiVersion: v1
> kind: ConfigMap
> metadata:
> name: myapp
> namespace: vela-system
> data:
> myapp: ...
> ```
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
content | content should be json encode string. | string | true |
msg_type | msg_type can be text, post, image, interactive, share_chat, share_user, audio, media, file, sticker. | string | true |
**Parameter**
| Name | Type | Description |
| :-------: | :----: | :------------------------------: |
| name | string | The name of the Application |
| namespace | string | The namespace of the Application |
#### slack (notification)
**Example**
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
url | Specify the the slack url, you can either sepcify it in value or use secretRef. | [url-option-0](#url-option-0-notification) or [url-option-1](#url-option-1-notification) | true |
message | Specify the message that you want to sent, refer to [slack messaging](https://api.slack.com/reference/messaging/payload). | [message](#message-notification) | true |
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: first-vela-workflow
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
traits:
- type: ingress
properties:
domain: testsvc.example.com
http:
/: 8000
workflow:
steps:
- name: express-server
type: depends-on-app
properties:
name: another-app
namespace: default
```
## apply-object
##### url-option-0 (notification)
**Overview**
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
value | the url address content in string. | string | true |
Apply Kubernetes native resources, you need to upgrade to KubeVela v1.1.4 or higher to enable `apply-object`.
**Parameters**
##### url-option-1 (notification)
| Name | Type | Description |
| :-------: | :----: | :-----------------------------------: |
| value | Object | Required, Kubernetes native resources fields |
| cluster | String | Optional, The cluster you want to apply the resource to, default is the current cluster. If you want to apply resource in different cluster, use `vela cluster join` to join the cluster first, and then specify the cluster |
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
secretRef | | [secretRef](#secretref-notification) | true |
**Example**
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: server-with-pvc
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
volumes:
- name: "my-pvc"
type: "pvc"
mountPath: "/test"
claimName: "myclaim"
##### secretRef (notification)
workflow:
steps:
- name: apply-pvc
type: apply-object
properties:
# Kubernetes native resources fields
value:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: myclaim
namespace: default
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 8Gi
storageClassName: standard
# the cluster you want to apply the resource to, default is the current cluster
cluster: <your cluster name>
- name: apply-server
type: apply-component
properties:
component: express-serve
```
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
name | name is the name of the secret. | string | true |
key | key is the key in the secret. | string | true |
## read-object
**Overview**
##### message (notification)
Read Kubernetes native resources, you need to upgrade to KubeVela v1.1.6 or higher to enable `read-object`.
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
text | Specify the message text for slack notification. | string | true |
blocks | | (null\|[...]) | false |
attachments | | (null\|{...}) | false |
thread_ts | | string | false |
mrkdwn | Specify the message text format in markdown for slack notification. | bool | false | true
**Parameters**
| Name | Type | Description |
| :-------: | :----: | :-----------------------------------: |
| apiVersion | String | Required, The apiVersion of the resource you want to read |
| kind | String | Required, The kind of the resource you want to read |
| name | String | Required, The apiVersion of the resource you want to read |
| namespace | String | Optional, The namespace of the resource you want to read, defaults to `default` |
| cluster | String | Optional, The cluster you want to read the resource from, default is the current cluster. If you want to read resource in different cluster, use `vela cluster join` to join the cluster first, and then specify the cluster |
#### email (notification)
**Example**
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
content | Specify the content of the email. | [content](#content-notification) | true |
from | Specify the email info that you want to send from. | [from](#from-notification) | true |
to | Specify the email address that you want to send to. | []string | true |
##### content (notification)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
body | Specify the context body of the email. | string | true |
subject | Specify the subject of the email. | string | true |
##### from (notification)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
address | Specify the email address that you want to send from. | string | true |
alias | The alias is the email alias to show after sending the email. | string | false |
password | Specify the password of the email, you can either sepcify it in value or use secretRef. | [password-option-0](#password-option-0-notification) or [password-option-1](#password-option-1-notification) | true |
host | Specify the host of your email. | string | true |
port | Specify the port of the email host, default to 587. | int | false | 587
##### password-option-0 (notification)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
value | the password content in string. | string | true |
##### password-option-1 (notification)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
secretRef | | [secretRef](#secretref-notification) | true |
##### secretRef (notification)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
name | name is the name of the secret. | string | true |
key | key is the key in the secret. | string | true |
#### dingding (notification)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
url | Specify the the dingding url, you can either sepcify it in value or use secretRef. | [url-option-0](#url-option-0-notification) or [url-option-1](#url-option-1-notification) | true |
message | Specify the message that you want to sent, refer to [dingtalk messaging](https://developers.dingtalk.com/document/robots/custom-robot-access/title-72m-8ag-pqw). | [message](#message-notification) | true |
##### url-option-0 (notification)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
value | the url address content in string. | string | true |
##### url-option-1 (notification)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
secretRef | | [secretRef](#secretref-notification) | true |
##### secretRef (notification)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
name | name is the name of the secret. | string | true |
key | key is the key in the secret. | string | true |
##### message (notification)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
text | Specify the message content of dingtalk notification. | (null\|{...}) | false |
msgtype | msgType can be text, link, mardown, actionCard, feedCard. | string | false | text
link | | (null\|{...}) | false |
markdown | | (null\|{...}) | false |
at | | (null\|{...}) | false |
actionCard | | (null\|{...}) | false |
feedCard | | (null\|{...}) | false |
## Read-Object
### Description
Read Kubernetes objects from cluster for your workflow steps.
### Examples (read-object)
```yaml
apiVersion: core.oam.dev/v1beta1
@ -468,27 +633,102 @@ spec:
component: express-server
```
## export2config
### Specification (read-object)
**Overview**
Export data to ConfigMap, you need to upgrade to KubeVela v1.1.6 or higher to enable `export2config`.
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
name | Specify the name of the object. | string | true |
cluster | The cluster you want to apply the resource to, default is the current control plane cluster. | string | false | empty
apiVersion | Specify the apiVersion of the object, defaults to 'core.oam.dev/v1beta1'. | string | false |
kind | Specify the kind of the object, defaults to Application. | string | false |
namespace | The namespace of the resource you want to read. | string | false | default
**Parameters**
| Name | Type | Description |
| :-------: | :----: | :-----------------------------------: |
| configName | String | Required, The name of the ConfigMap |
| namespace | String | Optional, The namespace of the ConfigMap, defaults to `context.namespace` |
| data | Map | Required, The data that you want to export to ConfigMap |
## Share-Cloud-Resource
**Example**
### Description
Sync secrets created by terraform component to runtime clusters so that runtime clusters can share the created cloud resource.
### Specification (share-cloud-resource)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
env | Declare the name of the env in policy. | string | true |
policy | Declare the name of the env-binding policy, if empty, the first env-binding policy will be used. | string | false | empty
placements | Declare the location to bind. | [[]placements](#placements-share-cloud-resource) | true |
#### placements (share-cloud-resource)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
cluster | | string | false |
namespace | | string | false |
## Step-Group
### Description
A special step that you can declare 'subSteps' in it, 'subSteps' is an array containing any step type whose valid parameters do not include the `step-group` step type itself. The sub steps were executed in parallel.
### Examples (step-group)
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: export-config
name: example
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: crccheck/hello-world
port: 8000
- name: express-server2
type: webservice
properties:
image: crccheck/hello-world
port: 8000
workflow:
steps:
- name: step
type: step-group
subSteps:
- name: apply-sub-step1
type: apply-component
properties:
component: express-server
- name: apply-sub-step2
type: apply-component
properties:
component: express-server2
```
### Specification (step-group)
This capability has no arguments.
## Suspend
### Description
Suspend the current workflow, it can be resumed by 'vela workflow resume' command.
### Examples (suspend)
The `duration` parameter is supported in KubeVela v1.4 or higher.
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: first-vela-workflow
namespace: default
spec:
components:
@ -499,45 +739,42 @@ spec:
port: 8000
workflow:
steps:
- name: apply-server
type: apply-component
outputs:
- name: status
valueFrom: output.status.conditions[0].message
- name: slack-message
type: webhook-notification
properties:
component: express-server
- name: export-config
type: export-config
inputs:
- from: status
parameterKey: data.serverstatus
properties:
configName: my-configmap
data:
testkey: testvalue
slack:
# the Slack webhook address, please refer to: https://api.slack.com/messaging/webhooks
message:
text: Ready to apply the application, ask the administrator to approve and resume the workflow.
- name: manual-approval
type: suspend
# properties:
# duration: "30s"
- name: express-server
type: apply-application
```
## export2secret
### Specification (suspend)
**Overview**
Export data to Secret, you need to upgrade to KubeVela v1.1.6 or higher to enable `export2secret`.
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
duration | Specify the wait duration time to resume workflow such as "30s", "1min" or "2m15s". | string | false |
**Parameters**
| Name | Type | Description |
| :-------: | :----: | :-----------------------------------: |
| secretName | String | Required, The name of the Secret |
| namespace | String | Optional, The namespace of the Secret, defaults to `context.namespace` |
| data | Map | Required, The data that you want to export to Secret |
## Webhook
**Example**
### Description
Send a request to the specified Webhook URL. If no request body is specified, the current Application body will be sent by default.
### Examples (webhook)
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: export-secret
name: first-vela-workflow
namespace: default
spec:
components:
@ -548,20 +785,43 @@ spec:
port: 8000
workflow:
steps:
- name: apply-server
type: apply-component
outputs:
- name: status
valueFrom: output.status.conditions[0].message
- name: express-server
type: apply-application
- name: webhook
type: webhook
properties:
component: express-server
- name: export-secret
type: export-secret
inputs:
- from: status
parameterKey: data.serverstatus
properties:
secretName: my-secret
data:
testkey: testvalue
url:
value: <your webhook url>
```
### Specification (webhook)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
url | Specify the webhook url. | [url-option-0](#url-option-0-webhook) or [url-option-1](#url-option-1-webhook) | true |
data | Specify the data you want to send. | map[string]:(null\|bool\|string\|bytes\|{...}\|[...]\|number) | false |
#### url-option-0 (webhook)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
value | | string | true |
#### url-option-1 (webhook)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
secretRef | | [secretRef](#secretref-webhook) | true |
##### secretRef (webhook)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
name | name is the name of the secret. | string | true |
key | key is the key in the secret. | string | true |

View File

@ -4,7 +4,7 @@ title: 内置组件列表
本文档将**按字典序**展示所有内置组件的参数列表。
> 本文档由[脚本](../../contributor/cli-ref-doc)自动生成,请勿手动修改,上次更新于 2022-07-16T15:16:33+08:00。
> 本文档由[脚本](../../contributor/cli-ref-doc)自动生成,请勿手动修改,上次更新于 2022-07-24T21:02:31+08:00。
## Cron-Task
@ -38,18 +38,18 @@ spec:
cmd | 容器的启动命令。 | []string | false |
env | 容器中的环境变量。 | [[]env](#env-cron-task) | false |
schedule | 执行规则 [Cron 规范](https://en.wikipedia.org/wiki/Cron)。 | string | true |
concurrencyPolicy | 定义任务如何处理任务的重叠运行,可选值为 "Allow""Forbid" 或者 "Replace",默认值为 Allow。 | string | true | Allow
suspend | 是否暂停执行。 | bool | true | false
successfulJobsHistoryLimit | 保留多少个已经成功完成的任务记录。 | int | true | 3
failedJobsHistoryLimit | 保留多少个已经失败的任务记录。 | int | true | 1
concurrencyPolicy | 定义任务如何处理任务的重叠运行,可选值为 "Allow""Forbid" 或者 "Replace",默认值为 Allow。 | string | false | Allow
suspend | 是否暂停执行。 | bool | false | false
successfulJobsHistoryLimit | 保留多少个已经成功完成的任务记录。 | int | false | 3
failedJobsHistoryLimit | 保留多少个已经失败的任务记录。 | int | false | 1
startingDeadlineSeconds | Specify deadline in seconds for starting the job if it misses scheduled。 | int | false |
labels | 工作负载的标签。 | map[string]string | false |
annotations | 工作负载的注解。 | map[string]string | false |
count | 每次任务执行的并行度。 | int | true | 1
labels | 工作负载的标签。 | map[string]:string | false |
annotations | 工作负载的注解。 | map[string]:string | false |
count | 每次任务执行的并行度。 | int | false | 1
ttlSecondsAfterFinished | Limits the lifetime of a Job that has finished。 | int | false |
activeDeadlineSeconds | The duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it。 | int | false |
backoffLimit | The number of retries before marking this job failed。 | int | true | 6
restart | 定义失败重启策略,可选值为 Never 或者 OnFailure默认是 OnFailure。 | string | true | Never
backoffLimit | The number of retries before marking this job failed。 | int | false | 6
restart | 定义失败重启策略,可选值为 Never 或者 OnFailure默认是 OnFailure。 | string | false | Never
image | 容器使用的镜像。 | string | true |
imagePullPolicy | 镜像拉取策略。 | string | false |
cpu | CPU 核数 `0.5` (0.5 CPU 核), `1` (1 CPU 核)。 | string | false |
@ -118,11 +118,11 @@ spec:
exec | 通过在容器中执行一条命令判断是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [exec](#exec-cron-task) | false |
httpGet | 通过发送 httpGet 请求判断容器是否就绪。 请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [httpGet](#httpget-cron-task) | false |
tcpSocket | 通过 tcpSocket 是否开启判断容器是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [tcpSocket](#tcpsocket-cron-task) | false |
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | true | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | true | 10
timeoutSeconds | 定义检查的超时时间。 | int | true | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | true | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | true | 3
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | false | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | false | 10
timeoutSeconds | 定义检查的超时时间。 | int | false | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | false | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | false | 3
##### exec (cron-task)
@ -163,11 +163,11 @@ spec:
exec | 通过在容器中执行一条命令判断是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [exec](#exec-cron-task) | false |
httpGet | 通过发送 httpGet 请求判断容器是否就绪。 请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [httpGet](#httpget-cron-task) | false |
tcpSocket | 通过 tcpSocket 是否开启判断容器是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [tcpSocket](#tcpsocket-cron-task) | false |
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | true | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | true | 10
timeoutSeconds | 定义检查的超时时间。 | int | true | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | true | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | true | 3
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | false | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | false | 10
timeoutSeconds | 定义检查的超时时间。 | int | false | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | false | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | false | 3
##### exec (cron-task)
@ -266,8 +266,8 @@ spec:
cmd | 容器的启动命令。 | []string | false |
env | 容器中的环境变量。 | [[]env](#env-daemon) | false |
volumeMounts | | [volumeMounts](#volumemounts-daemon) | false |
labels | 工作负载的标签。 | map[string]string | false |
annotations | 工作负载的注解。 | map[string]string | false |
labels | 工作负载的标签。 | map[string]:string | false |
annotations | 工作负载的注解。 | map[string]:string | false |
image | 容器使用的镜像。 | string | true |
ports | 指定业务流量进入的端口(多个),默认为 80。 | [[]ports](#ports-daemon) | false |
imagePullPolicy | 镜像拉取策略。 | string | false |
@ -339,7 +339,7 @@ spec:
------ | ------ | ------ | ------------ | ---------
name | | string | true |
mountPath | | string | true |
defaultMode | | int | true | 420
defaultMode | | int | false | 420
cmName | | string | true |
items | | [[]items](#items-daemon) | false |
@ -350,7 +350,7 @@ spec:
------ | ------ | ------ | ------------ | ---------
path | | string | true |
key | | string | true |
mode | | int | true | 511
mode | | int | false | 511
##### secret (daemon)
@ -359,7 +359,7 @@ spec:
------ | ------ | ------ | ------------ | ---------
name | | string | true |
mountPath | | string | true |
defaultMode | | int | true | 420
defaultMode | | int | false | 420
items | | [[]items](#items-daemon) | false |
secretName | | string | true |
@ -370,7 +370,7 @@ spec:
------ | ------ | ------ | ------------ | ---------
path | | string | true |
key | | string | true |
mode | | int | true | 511
mode | | int | false | 511
##### emptyDir (daemon)
@ -379,7 +379,7 @@ spec:
------ | ------ | ------ | ------------ | ---------
name | | string | true |
mountPath | | string | true |
medium | | string | true | empty
medium | | string | false | empty
##### hostPath (daemon)
@ -399,8 +399,8 @@ spec:
------ | ------ | ------ | ------------ | ---------
name | 端口名称。 | string | false |
port | 要暴露的 IP 端口号。 | int | true |
protocol | 端口协议类型 UDP TCP 或者 SCTP。 | string | true | TCP
expose | 端口是否需要暴露。 | bool | true | false
protocol | 端口协议类型 UDP TCP 或者 SCTP。 | string | false | TCP
expose | 端口是否需要暴露。 | bool | false | false
#### volumes (daemon)
@ -419,11 +419,11 @@ spec:
exec | 通过在容器中执行一条命令判断是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [exec](#exec-daemon) | false |
httpGet | 通过发送 httpGet 请求判断容器是否就绪。 请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [httpGet](#httpget-daemon) | false |
tcpSocket | 通过 tcpSocket 是否开启判断容器是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [tcpSocket](#tcpsocket-daemon) | false |
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | true | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | true | 10
timeoutSeconds | 定义检查的超时时间。 | int | true | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | true | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | true | 3
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | false | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | false | 10
timeoutSeconds | 定义检查的超时时间。 | int | false | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | false | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | false | 3
##### exec (daemon)
@ -466,11 +466,11 @@ spec:
exec | 通过在容器中执行一条命令判断是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [exec](#exec-daemon) | false |
httpGet | 通过发送 httpGet 请求判断容器是否就绪。 请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [httpGet](#httpget-daemon) | false |
tcpSocket | 通过 tcpSocket 是否开启判断容器是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [tcpSocket](#tcpsocket-daemon) | false |
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | true | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | true | 10
timeoutSeconds | 定义检查的超时时间。 | int | true | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | true | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | true | 3
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | false | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | false | 10
timeoutSeconds | 定义检查的超时时间。 | int | false | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | false | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | false | 3
##### exec (daemon)
@ -583,10 +583,10 @@ spec:
------ | ------ | ------ | ------------ | ---------
cmd | 容器的启动命令。 | []string | false |
env | 容器中的环境变量。 | [[]env](#env-task) | false |
count | 每次任务执行的并行度。 | int | true | 1
labels | 工作负载的标签。 | map[string]string | false |
annotations | 工作负载的注解。 | map[string]string | false |
restart | 定义失败重启策略,可选值为 Never 或者 OnFailure默认是 OnFailure。 | string | true | Never
count | 每次任务执行的并行度。 | int | false | 1
labels | 工作负载的标签。 | map[string]:string | false |
annotations | 工作负载的注解。 | map[string]:string | false |
restart | 定义失败重启策略,可选值为 Never 或者 OnFailure默认是 OnFailure。 | string | false | Never
image | 容器使用的镜像。 | string | true |
imagePullPolicy | 镜像拉取策略。 | string | false |
cpu | CPU 核数 `0.5` (0.5 CPU 核), `1` (1 CPU 核)。 | string | false |
@ -646,11 +646,11 @@ spec:
exec | 通过在容器中执行一条命令判断是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [exec](#exec-task) | false |
httpGet | 通过发送 httpGet 请求判断容器是否就绪。 请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [httpGet](#httpget-task) | false |
tcpSocket | 通过 tcpSocket 是否开启判断容器是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [tcpSocket](#tcpsocket-task) | false |
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | true | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | true | 10
timeoutSeconds | 定义检查的超时时间。 | int | true | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | true | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | true | 3
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | false | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | false | 10
timeoutSeconds | 定义检查的超时时间。 | int | false | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | false | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | false | 3
##### exec (task)
@ -691,11 +691,11 @@ spec:
exec | 通过在容器中执行一条命令判断是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [exec](#exec-task) | false |
httpGet | 通过发送 httpGet 请求判断容器是否就绪。 请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [httpGet](#httpget-task) | false |
tcpSocket | 通过 tcpSocket 是否开启判断容器是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [tcpSocket](#tcpsocket-task) | false |
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | true | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | true | 10
timeoutSeconds | 定义检查的超时时间。 | int | true | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | true | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | true | 3
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | false | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | false | 10
timeoutSeconds | 定义检查的超时时间。 | int | false | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | false | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | false | 3
##### exec (task)
@ -771,8 +771,8 @@ spec:
cmd | 容器的启动命令。 | []string | false |
env | 容器中的环境变量。 | [[]env](#env-webservice) | false |
volumeMounts | | [volumeMounts](#volumemounts-webservice) | false |
labels | 工作负载的标签。 | map[string]string | false |
annotations | 工作负载的注解。 | map[string]string | false |
labels | 工作负载的标签。 | map[string]:string | false |
annotations | 工作负载的注解。 | map[string]:string | false |
image | 容器使用的镜像。 | string | true |
ports | 指定业务流量进入的端口(多个),默认为 80。 | [[]ports](#ports-webservice) | false |
imagePullPolicy | 镜像拉取策略。 | string | false |
@ -844,7 +844,7 @@ spec:
------ | ------ | ------ | ------------ | ---------
name | | string | true |
mountPath | | string | true |
defaultMode | | int | true | 420
defaultMode | | int | false | 420
cmName | | string | true |
items | | [[]items](#items-webservice) | false |
@ -855,7 +855,7 @@ spec:
------ | ------ | ------ | ------------ | ---------
path | | string | true |
key | | string | true |
mode | | int | true | 511
mode | | int | false | 511
##### secret (webservice)
@ -864,7 +864,7 @@ spec:
------ | ------ | ------ | ------------ | ---------
name | | string | true |
mountPath | | string | true |
defaultMode | | int | true | 420
defaultMode | | int | false | 420
items | | [[]items](#items-webservice) | false |
secretName | | string | true |
@ -875,7 +875,7 @@ spec:
------ | ------ | ------ | ------------ | ---------
path | | string | true |
key | | string | true |
mode | | int | true | 511
mode | | int | false | 511
##### emptyDir (webservice)
@ -884,7 +884,7 @@ spec:
------ | ------ | ------ | ------------ | ---------
name | | string | true |
mountPath | | string | true |
medium | | string | true | empty
medium | | string | false | empty
##### hostPath (webservice)
@ -902,8 +902,8 @@ spec:
------ | ------ | ------ | ------------ | ---------
name | 端口名称。 | string | false |
port | 要暴露的 IP 端口号。 | int | true |
protocol | 端口协议类型 UDP TCP 或者 SCTP。 | string | true | TCP
expose | 端口是否需要暴露。 | bool | true | false
protocol | 端口协议类型 UDP TCP 或者 SCTP。 | string | false | TCP
expose | 端口是否需要暴露。 | bool | false | false
#### volumes (webservice)
@ -922,11 +922,11 @@ spec:
exec | 通过在容器中执行一条命令判断是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [exec](#exec-webservice) | false |
httpGet | 通过发送 httpGet 请求判断容器是否就绪。 请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [httpGet](#httpget-webservice) | false |
tcpSocket | 通过 tcpSocket 是否开启判断容器是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [tcpSocket](#tcpsocket-webservice) | false |
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | true | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | true | 10
timeoutSeconds | 定义检查的超时时间。 | int | true | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | true | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | true | 3
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | false | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | false | 10
timeoutSeconds | 定义检查的超时时间。 | int | false | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | false | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | false | 3
##### exec (webservice)
@ -969,11 +969,11 @@ spec:
exec | 通过在容器中执行一条命令判断是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [exec](#exec-webservice) | false |
httpGet | 通过发送 httpGet 请求判断容器是否就绪。 请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [httpGet](#httpget-webservice) | false |
tcpSocket | 通过 tcpSocket 是否开启判断容器是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [tcpSocket](#tcpsocket-webservice) | false |
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | true | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | true | 10
timeoutSeconds | 定义检查的超时时间。 | int | true | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | true | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | true | 3
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | false | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | false | 10
timeoutSeconds | 定义检查的超时时间。 | int | false | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | false | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | false | 3
##### exec (webservice)

View File

@ -4,7 +4,7 @@ title: 内置策略列表
本文档将**按字典序**展示所有内置策略的参数列表。
> 本文档由[脚本](../../contributor/cli-ref-doc)自动生成,请勿手动修改,上次更新于 2022-07-23T15:27:57+08:00。
> 本文档由[脚本](../../contributor/cli-ref-doc)自动生成,请勿手动修改,上次更新于 2022-07-24T21:01:20+08:00。
## Apply-Once
@ -14,7 +14,7 @@ title: 内置策略列表
### 示例 (apply-once)
It's generally used in [one time delivery only without continuous management](../policies/apply-once) scenario.
It's generally used in [one time delivery only without continuous management](https://kubevela.io/docs/end-user/policies/apply-once) scenario.
```yaml
apiVersion: core.oam.dev/v1beta1
@ -43,7 +43,7 @@ spec:
名称 | 描述 | 类型 | 是否必须 | 默认值
------ | ------ | ------ | ------------ | ---------
enable | 当设置为 true 时,表示只交付部署、不保证终态一致、允许配置漂移。 | bool | true | false
enable | 当设置为 true 时,表示只交付部署、不保证终态一致、允许配置漂移。 | bool | false | false
rules | 指定交付一次的资源规则。 | [[]rules](#rules-apply-once) | false |
@ -82,7 +82,7 @@ spec:
### 示例 (garbage-collect)
It's used in [garbage collection](../policies/gc) scenario. It can be used to configure the collection policy, e.g. don't delete the legacy resources when updating.
It's used in [garbage collection](https://kubevela.io/docs/end-user/policies/gc) scenario. It can be used to configure the collection policy, e.g. don't delete the legacy resources when updating.
```yaml
apiVersion: core.oam.dev/v1beta1
@ -140,7 +140,7 @@ spec:
名称 | 描述 | 类型 | 是否必须 | 默认值
------ | ------ | ------ | ------------ | ---------
keepLegacyResource | 如果为 true过时的版本化 resource tracker 将不会自动回收。 过时的资源将被保留,直到手动删除 resource tracker。 | bool | true | false
keepLegacyResource | 如果为 true过时的版本化 resource tracker 将不会自动回收。 过时的资源将被保留,直到手动删除 resource tracker。 | bool | false | false
rules | 在资源级别控制垃圾回收策略的规则列表,如果一个资源由多个规则控制,将使用第一个规则。 | [[]rules](#rules-garbage-collect) | false |
@ -149,7 +149,7 @@ spec:
名称 | 描述 | 类型 | 是否必须 | 默认值
------ | ------ | ------ | ------------ | ---------
selector | 指定资源筛选目标规则。 | [[]selector](#selector-garbage-collect) | true |
strategy | 目标资源循环利用的策略。 可用值never、onAppDelete、onAppUpdate。 | string | true | onAppUpdate
strategy | 目标资源循环利用的策略。 可用值never、onAppDelete、onAppUpdate。 | string | false | onAppUpdate
##### selector (garbage-collect)
@ -175,8 +175,8 @@ Apply periodical health checking to the application。
名称 | 描述 | 类型 | 是否必须 | 默认值
------ | ------ | ------ | ------------ | ---------
probeTimeout | Specify health checking timeout(seconds), default 10s。 | int | true | 10
probeInterval | Specify health checking interval(seconds), default 30s。 | int | true | 30
probeTimeout | Specify health checking timeout(seconds), default 10s。 | int | false | 10
probeInterval | Specify health checking interval(seconds), default 30s。 | int | false | 30
## Override
@ -315,7 +315,7 @@ spec:
------ | ------ | ------ | ------------ | ---------
type | 要做参数覆盖的 trait 类型。 | string | true |
properties | 要覆盖的配置属性,未填写配置会与原先的配置合并。 | map[string]:(null\|bool\|string\|bytes\|{...}\|[...]\|number) | false |
disable | 如果为 true该 trait 将被删除,默认 false。 | bool | true | false
disable | 如果为 true该 trait 将被删除,默认 false。 | bool | false | false
## Topology

View File

@ -4,7 +4,7 @@ title: 内置组件列表
本文档将**按字典序**展示所有内置组件的参数列表。
> 本文档由[脚本](../../contributor/cli-ref-doc)自动生成,请勿手动修改,上次更新于 2022-07-16T15:16:33+08:00。
> 本文档由[脚本](../../contributor/cli-ref-doc)自动生成,请勿手动修改,上次更新于 2022-07-24T21:02:31+08:00。
## Cron-Task
@ -38,18 +38,18 @@ spec:
cmd | 容器的启动命令。 | []string | false |
env | 容器中的环境变量。 | [[]env](#env-cron-task) | false |
schedule | 执行规则 [Cron 规范](https://en.wikipedia.org/wiki/Cron)。 | string | true |
concurrencyPolicy | 定义任务如何处理任务的重叠运行,可选值为 "Allow""Forbid" 或者 "Replace",默认值为 Allow。 | string | true | Allow
suspend | 是否暂停执行。 | bool | true | false
successfulJobsHistoryLimit | 保留多少个已经成功完成的任务记录。 | int | true | 3
failedJobsHistoryLimit | 保留多少个已经失败的任务记录。 | int | true | 1
concurrencyPolicy | 定义任务如何处理任务的重叠运行,可选值为 "Allow""Forbid" 或者 "Replace",默认值为 Allow。 | string | false | Allow
suspend | 是否暂停执行。 | bool | false | false
successfulJobsHistoryLimit | 保留多少个已经成功完成的任务记录。 | int | false | 3
failedJobsHistoryLimit | 保留多少个已经失败的任务记录。 | int | false | 1
startingDeadlineSeconds | Specify deadline in seconds for starting the job if it misses scheduled。 | int | false |
labels | 工作负载的标签。 | map[string]string | false |
annotations | 工作负载的注解。 | map[string]string | false |
count | 每次任务执行的并行度。 | int | true | 1
labels | 工作负载的标签。 | map[string]:string | false |
annotations | 工作负载的注解。 | map[string]:string | false |
count | 每次任务执行的并行度。 | int | false | 1
ttlSecondsAfterFinished | Limits the lifetime of a Job that has finished。 | int | false |
activeDeadlineSeconds | The duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it。 | int | false |
backoffLimit | The number of retries before marking this job failed。 | int | true | 6
restart | 定义失败重启策略,可选值为 Never 或者 OnFailure默认是 OnFailure。 | string | true | Never
backoffLimit | The number of retries before marking this job failed。 | int | false | 6
restart | 定义失败重启策略,可选值为 Never 或者 OnFailure默认是 OnFailure。 | string | false | Never
image | 容器使用的镜像。 | string | true |
imagePullPolicy | 镜像拉取策略。 | string | false |
cpu | CPU 核数 `0.5` (0.5 CPU 核), `1` (1 CPU 核)。 | string | false |
@ -118,11 +118,11 @@ spec:
exec | 通过在容器中执行一条命令判断是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [exec](#exec-cron-task) | false |
httpGet | 通过发送 httpGet 请求判断容器是否就绪。 请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [httpGet](#httpget-cron-task) | false |
tcpSocket | 通过 tcpSocket 是否开启判断容器是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [tcpSocket](#tcpsocket-cron-task) | false |
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | true | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | true | 10
timeoutSeconds | 定义检查的超时时间。 | int | true | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | true | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | true | 3
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | false | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | false | 10
timeoutSeconds | 定义检查的超时时间。 | int | false | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | false | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | false | 3
##### exec (cron-task)
@ -163,11 +163,11 @@ spec:
exec | 通过在容器中执行一条命令判断是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [exec](#exec-cron-task) | false |
httpGet | 通过发送 httpGet 请求判断容器是否就绪。 请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [httpGet](#httpget-cron-task) | false |
tcpSocket | 通过 tcpSocket 是否开启判断容器是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [tcpSocket](#tcpsocket-cron-task) | false |
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | true | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | true | 10
timeoutSeconds | 定义检查的超时时间。 | int | true | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | true | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | true | 3
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | false | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | false | 10
timeoutSeconds | 定义检查的超时时间。 | int | false | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | false | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | false | 3
##### exec (cron-task)
@ -266,8 +266,8 @@ spec:
cmd | 容器的启动命令。 | []string | false |
env | 容器中的环境变量。 | [[]env](#env-daemon) | false |
volumeMounts | | [volumeMounts](#volumemounts-daemon) | false |
labels | 工作负载的标签。 | map[string]string | false |
annotations | 工作负载的注解。 | map[string]string | false |
labels | 工作负载的标签。 | map[string]:string | false |
annotations | 工作负载的注解。 | map[string]:string | false |
image | 容器使用的镜像。 | string | true |
ports | 指定业务流量进入的端口(多个),默认为 80。 | [[]ports](#ports-daemon) | false |
imagePullPolicy | 镜像拉取策略。 | string | false |
@ -339,7 +339,7 @@ spec:
------ | ------ | ------ | ------------ | ---------
name | | string | true |
mountPath | | string | true |
defaultMode | | int | true | 420
defaultMode | | int | false | 420
cmName | | string | true |
items | | [[]items](#items-daemon) | false |
@ -350,7 +350,7 @@ spec:
------ | ------ | ------ | ------------ | ---------
path | | string | true |
key | | string | true |
mode | | int | true | 511
mode | | int | false | 511
##### secret (daemon)
@ -359,7 +359,7 @@ spec:
------ | ------ | ------ | ------------ | ---------
name | | string | true |
mountPath | | string | true |
defaultMode | | int | true | 420
defaultMode | | int | false | 420
items | | [[]items](#items-daemon) | false |
secretName | | string | true |
@ -370,7 +370,7 @@ spec:
------ | ------ | ------ | ------------ | ---------
path | | string | true |
key | | string | true |
mode | | int | true | 511
mode | | int | false | 511
##### emptyDir (daemon)
@ -379,7 +379,7 @@ spec:
------ | ------ | ------ | ------------ | ---------
name | | string | true |
mountPath | | string | true |
medium | | string | true | empty
medium | | string | false | empty
##### hostPath (daemon)
@ -399,8 +399,8 @@ spec:
------ | ------ | ------ | ------------ | ---------
name | 端口名称。 | string | false |
port | 要暴露的 IP 端口号。 | int | true |
protocol | 端口协议类型 UDP TCP 或者 SCTP。 | string | true | TCP
expose | 端口是否需要暴露。 | bool | true | false
protocol | 端口协议类型 UDP TCP 或者 SCTP。 | string | false | TCP
expose | 端口是否需要暴露。 | bool | false | false
#### volumes (daemon)
@ -419,11 +419,11 @@ spec:
exec | 通过在容器中执行一条命令判断是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [exec](#exec-daemon) | false |
httpGet | 通过发送 httpGet 请求判断容器是否就绪。 请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [httpGet](#httpget-daemon) | false |
tcpSocket | 通过 tcpSocket 是否开启判断容器是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [tcpSocket](#tcpsocket-daemon) | false |
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | true | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | true | 10
timeoutSeconds | 定义检查的超时时间。 | int | true | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | true | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | true | 3
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | false | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | false | 10
timeoutSeconds | 定义检查的超时时间。 | int | false | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | false | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | false | 3
##### exec (daemon)
@ -466,11 +466,11 @@ spec:
exec | 通过在容器中执行一条命令判断是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [exec](#exec-daemon) | false |
httpGet | 通过发送 httpGet 请求判断容器是否就绪。 请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [httpGet](#httpget-daemon) | false |
tcpSocket | 通过 tcpSocket 是否开启判断容器是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [tcpSocket](#tcpsocket-daemon) | false |
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | true | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | true | 10
timeoutSeconds | 定义检查的超时时间。 | int | true | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | true | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | true | 3
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | false | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | false | 10
timeoutSeconds | 定义检查的超时时间。 | int | false | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | false | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | false | 3
##### exec (daemon)
@ -583,10 +583,10 @@ spec:
------ | ------ | ------ | ------------ | ---------
cmd | 容器的启动命令。 | []string | false |
env | 容器中的环境变量。 | [[]env](#env-task) | false |
count | 每次任务执行的并行度。 | int | true | 1
labels | 工作负载的标签。 | map[string]string | false |
annotations | 工作负载的注解。 | map[string]string | false |
restart | 定义失败重启策略,可选值为 Never 或者 OnFailure默认是 OnFailure。 | string | true | Never
count | 每次任务执行的并行度。 | int | false | 1
labels | 工作负载的标签。 | map[string]:string | false |
annotations | 工作负载的注解。 | map[string]:string | false |
restart | 定义失败重启策略,可选值为 Never 或者 OnFailure默认是 OnFailure。 | string | false | Never
image | 容器使用的镜像。 | string | true |
imagePullPolicy | 镜像拉取策略。 | string | false |
cpu | CPU 核数 `0.5` (0.5 CPU 核), `1` (1 CPU 核)。 | string | false |
@ -646,11 +646,11 @@ spec:
exec | 通过在容器中执行一条命令判断是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [exec](#exec-task) | false |
httpGet | 通过发送 httpGet 请求判断容器是否就绪。 请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [httpGet](#httpget-task) | false |
tcpSocket | 通过 tcpSocket 是否开启判断容器是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [tcpSocket](#tcpsocket-task) | false |
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | true | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | true | 10
timeoutSeconds | 定义检查的超时时间。 | int | true | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | true | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | true | 3
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | false | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | false | 10
timeoutSeconds | 定义检查的超时时间。 | int | false | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | false | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | false | 3
##### exec (task)
@ -691,11 +691,11 @@ spec:
exec | 通过在容器中执行一条命令判断是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [exec](#exec-task) | false |
httpGet | 通过发送 httpGet 请求判断容器是否就绪。 请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [httpGet](#httpget-task) | false |
tcpSocket | 通过 tcpSocket 是否开启判断容器是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [tcpSocket](#tcpsocket-task) | false |
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | true | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | true | 10
timeoutSeconds | 定义检查的超时时间。 | int | true | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | true | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | true | 3
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | false | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | false | 10
timeoutSeconds | 定义检查的超时时间。 | int | false | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | false | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | false | 3
##### exec (task)
@ -771,8 +771,8 @@ spec:
cmd | 容器的启动命令。 | []string | false |
env | 容器中的环境变量。 | [[]env](#env-webservice) | false |
volumeMounts | | [volumeMounts](#volumemounts-webservice) | false |
labels | 工作负载的标签。 | map[string]string | false |
annotations | 工作负载的注解。 | map[string]string | false |
labels | 工作负载的标签。 | map[string]:string | false |
annotations | 工作负载的注解。 | map[string]:string | false |
image | 容器使用的镜像。 | string | true |
ports | 指定业务流量进入的端口(多个),默认为 80。 | [[]ports](#ports-webservice) | false |
imagePullPolicy | 镜像拉取策略。 | string | false |
@ -844,7 +844,7 @@ spec:
------ | ------ | ------ | ------------ | ---------
name | | string | true |
mountPath | | string | true |
defaultMode | | int | true | 420
defaultMode | | int | false | 420
cmName | | string | true |
items | | [[]items](#items-webservice) | false |
@ -855,7 +855,7 @@ spec:
------ | ------ | ------ | ------------ | ---------
path | | string | true |
key | | string | true |
mode | | int | true | 511
mode | | int | false | 511
##### secret (webservice)
@ -864,7 +864,7 @@ spec:
------ | ------ | ------ | ------------ | ---------
name | | string | true |
mountPath | | string | true |
defaultMode | | int | true | 420
defaultMode | | int | false | 420
items | | [[]items](#items-webservice) | false |
secretName | | string | true |
@ -875,7 +875,7 @@ spec:
------ | ------ | ------ | ------------ | ---------
path | | string | true |
key | | string | true |
mode | | int | true | 511
mode | | int | false | 511
##### emptyDir (webservice)
@ -884,7 +884,7 @@ spec:
------ | ------ | ------ | ------------ | ---------
name | | string | true |
mountPath | | string | true |
medium | | string | true | empty
medium | | string | false | empty
##### hostPath (webservice)
@ -902,8 +902,8 @@ spec:
------ | ------ | ------ | ------------ | ---------
name | 端口名称。 | string | false |
port | 要暴露的 IP 端口号。 | int | true |
protocol | 端口协议类型 UDP TCP 或者 SCTP。 | string | true | TCP
expose | 端口是否需要暴露。 | bool | true | false
protocol | 端口协议类型 UDP TCP 或者 SCTP。 | string | false | TCP
expose | 端口是否需要暴露。 | bool | false | false
#### volumes (webservice)
@ -922,11 +922,11 @@ spec:
exec | 通过在容器中执行一条命令判断是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [exec](#exec-webservice) | false |
httpGet | 通过发送 httpGet 请求判断容器是否就绪。 请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [httpGet](#httpget-webservice) | false |
tcpSocket | 通过 tcpSocket 是否开启判断容器是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [tcpSocket](#tcpsocket-webservice) | false |
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | true | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | true | 10
timeoutSeconds | 定义检查的超时时间。 | int | true | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | true | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | true | 3
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | false | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | false | 10
timeoutSeconds | 定义检查的超时时间。 | int | false | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | false | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | false | 3
##### exec (webservice)
@ -969,11 +969,11 @@ spec:
exec | 通过在容器中执行一条命令判断是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [exec](#exec-webservice) | false |
httpGet | 通过发送 httpGet 请求判断容器是否就绪。 请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [httpGet](#httpget-webservice) | false |
tcpSocket | 通过 tcpSocket 是否开启判断容器是否就绪。请注意就绪性检查必须并且也只能定义 httpGettcpSocket 或者 exec 中的一个。 | [tcpSocket](#tcpsocket-webservice) | false |
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | true | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | true | 10
timeoutSeconds | 定义检查的超时时间。 | int | true | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | true | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | true | 3
initialDelaySeconds | 定义容器启动多少秒之后开始第一次检查。 | int | false | 0
periodSeconds | 定义每次检查之间的时间间隔。 | int | false | 10
timeoutSeconds | 定义检查的超时时间。 | int | false | 1
successThreshold | 定义检查成功多少次之后判断容器已经就绪。 | int | false | 1
failureThreshold | 定义检查失败多少次之后判断容器已经不健康。 | int | false | 3
##### exec (webservice)

View File

@ -4,7 +4,7 @@ title: 内置策略列表
本文档将**按字典序**展示所有内置策略的参数列表。
> 本文档由[脚本](../../contributor/cli-ref-doc)自动生成,请勿手动修改,上次更新于 2022-07-23T15:27:57+08:00。
> 本文档由[脚本](../../contributor/cli-ref-doc)自动生成,请勿手动修改,上次更新于 2022-07-24T21:01:20+08:00。
## Apply-Once
@ -14,7 +14,7 @@ title: 内置策略列表
### 示例 (apply-once)
It's generally used in [one time delivery only without continuous management](../policies/apply-once) scenario.
It's generally used in [one time delivery only without continuous management](https://kubevela.io/docs/end-user/policies/apply-once) scenario.
```yaml
apiVersion: core.oam.dev/v1beta1
@ -43,7 +43,7 @@ spec:
名称 | 描述 | 类型 | 是否必须 | 默认值
------ | ------ | ------ | ------------ | ---------
enable | 当设置为 true 时,表示只交付部署、不保证终态一致、允许配置漂移。 | bool | true | false
enable | 当设置为 true 时,表示只交付部署、不保证终态一致、允许配置漂移。 | bool | false | false
rules | 指定交付一次的资源规则。 | [[]rules](#rules-apply-once) | false |
@ -82,7 +82,7 @@ spec:
### 示例 (garbage-collect)
It's used in [garbage collection](../policies/gc) scenario. It can be used to configure the collection policy, e.g. don't delete the legacy resources when updating.
It's used in [garbage collection](https://kubevela.io/docs/end-user/policies/gc) scenario. It can be used to configure the collection policy, e.g. don't delete the legacy resources when updating.
```yaml
apiVersion: core.oam.dev/v1beta1
@ -140,7 +140,7 @@ spec:
名称 | 描述 | 类型 | 是否必须 | 默认值
------ | ------ | ------ | ------------ | ---------
keepLegacyResource | 如果为 true过时的版本化 resource tracker 将不会自动回收。 过时的资源将被保留,直到手动删除 resource tracker。 | bool | true | false
keepLegacyResource | 如果为 true过时的版本化 resource tracker 将不会自动回收。 过时的资源将被保留,直到手动删除 resource tracker。 | bool | false | false
rules | 在资源级别控制垃圾回收策略的规则列表,如果一个资源由多个规则控制,将使用第一个规则。 | [[]rules](#rules-garbage-collect) | false |
@ -149,7 +149,7 @@ spec:
名称 | 描述 | 类型 | 是否必须 | 默认值
------ | ------ | ------ | ------------ | ---------
selector | 指定资源筛选目标规则。 | [[]selector](#selector-garbage-collect) | true |
strategy | 目标资源循环利用的策略。 可用值never、onAppDelete、onAppUpdate。 | string | true | onAppUpdate
strategy | 目标资源循环利用的策略。 可用值never、onAppDelete、onAppUpdate。 | string | false | onAppUpdate
##### selector (garbage-collect)
@ -175,8 +175,8 @@ Apply periodical health checking to the application。
名称 | 描述 | 类型 | 是否必须 | 默认值
------ | ------ | ------ | ------------ | ---------
probeTimeout | Specify health checking timeout(seconds), default 10s。 | int | true | 10
probeInterval | Specify health checking interval(seconds), default 30s。 | int | true | 30
probeTimeout | Specify health checking timeout(seconds), default 10s。 | int | false | 10
probeInterval | Specify health checking interval(seconds), default 30s。 | int | false | 30
## Override
@ -315,7 +315,7 @@ spec:
------ | ------ | ------ | ------------ | ---------
type | 要做参数覆盖的 trait 类型。 | string | true |
properties | 要覆盖的配置属性,未填写配置会与原先的配置合并。 | map[string]:(null\|bool\|string\|bytes\|{...}\|[...]\|number) | false |
disable | 如果为 true该 trait 将被删除,默认 false。 | bool | true | false
disable | 如果为 true该 trait 将被删除,默认 false。 | bool | false | false
## Topology

View File

@ -595,5 +595,140 @@
},
"Specify the target namespace to deploy in the selected clusters, default inherit the original namespace": {
"Chinese": "要在选定集群中部署的目标命名空间。 如果未设置,组件将继承原始命名空间"
},
"Apply raw kubernetes objects for your workflow steps": {
"Chinese": "在工作流中部署 Kubernetes 资源对象"
},
"Specify Kubernetes native resource object to be applied": {
"Chinese": "Kubernetes 资源对象参数"
},
"The cluster you want to apply the resource to, default is the current control plane cluster": {
"Chinese": "需要部署的集群名称。如果不指定,则为当前集群"
},
"Wait for the specified Application to complete": {
"Chinese": "等待指定的 Application 完成"
},
"Specify the name of the dependent Application": {
"Chinese": "需要等待的 Application 名称"
},
"Specify the namespace of the dependent Application": {
"Chinese": "需要等待的 Application 所在的命名空间"
},
"A powerful and unified deploy step for components multi-cluster delivery with policies": {
"Chinese": "功能丰富且统一的用于多集群部署的步骤,可以指定多集群差异化配置策略"
},
"If set to false, the workflow will suspend automatically before this step, default to be true": {
"Chinese": "默认为 true。如果为 false工作流将在执行该步骤前自动暂停。"
},
"Maximum number of concurrent delivered components": {
"Chinese": "指定本次部署的并发度"
},
"If set false, this step will apply the components with the terraform workload": {
"Chinese": "部署时忽略 Terraform 的组件默认忽略Terraform 仅需要在管控集群操作云资源,不需要管控信息下发到多集群"
},
"Declare the policies that used for this deployment. If not specified, the components will be deployed to the hub cluster": {
"Chinese": "指定本次部署要使用的策略。如果不指定策略,将自动部署到管控集群"
},
"Deploy cloud resource and deliver secret to multi clusters": {
"Chinese": "将云资源生成的秘钥部署到多集群"
},
"Declare the name of the env in policy": {
"Chinese": "指定多集群策略中定义的环境名称"
},
"Export data to specified Kubernetes ConfigMap in your workflow": {
"Chinese": "在工作流中导出数据到 Kubernetes ConfigMap 对象"
},
"Specify the cluster of the config map": {
"Chinese": "要导出到的集群名称"
},
"Specify the name of the config map": {
"Chinese": "ConfigMap 的名称"
},
"Specify the data of config map": {
"Chinese": "需要导出到 ConfigMap 中的数据,是一个 key-value 的 map"
},
"Specify the namespace of the config map": {
"Chinese": "ConfigMap 的 namespace默认为当前应用的 namespace"
},
"Export data to Kubernetes Secret in your workflow": {
"Chinese": "在工作流中导出数据到 Kubernetes Secret 对象"
},
"Specify the cluster of the secret": {
"Chinese": "要导出到的集群名称"
},
"Specify the namespace of the secret": {
"Chinese": "secret 的 namespace默认为当前应用的 namespace"
},
"Specify the type of the secret": {
"Chinese": "指定导出的 secret 类型"
},
"Specify the name of the secret": {
"Chinese": "Secret 的名称"
},
"Specify the data of secret": {
"Chinese": "需要导出到 Secret 中的数据"
},
"Send notifications to Email, DingTalk, Slack, Lark or webhook in your workflow": {
"Chinese": "向指定的 Webhook 发送信息支持邮件、钉钉、Slack 和飞书"
},
"Please fulfill its url and message if you want to send Lark messages": {
"Chinese": "发送飞书信息"
},
"Please fulfill its url and message if you want to send Slack messages": {
"Chinese": "发送 Slack 信息"
},
"Please fulfill its from, to and content if you want to send email": {
"Chinese": "发送邮件通知"
},
"Please fulfill its url and message if you want to send DingTalk messages": {
"Chinese": "发送钉钉信息"
},
"Specify the content of the email": {
"Chinese": "指定邮件内容"
},
"Specify the email info that you want to send from": {
"Chinese": "指定邮件发送人信息"
},
"Specify the email address that you want to send to": {
"Chinese": "指定收件人信息"
},
"Specify the context body of the email": {
"Chinese": "指定邮件正文内容"
},
"Specify the subject of the email": {
"Chinese": "指定邮件标题"
},
"Specify the email address that you want to send from": {
"Chinese": "发件人邮件地址"
},
"Specify the the slack url, you can either sepcify it in value or use secretRef": {
"Chinese": "Slack 的 Webhook 地址,可以选择直接在 value 填写或从 secretRef 中获取"
},
"Read Kubernetes objects from cluster for your workflow steps": {
"Chinese": "在工作流中读取 Kubernetes 资源对象"
},
"A special step that you can declare 'subSteps' in it, 'subSteps' is an array containing any step type whose valid parameters do not include the `step-group` step type itself. The sub steps were executed in parallel.": {
"Chinese": "特殊的工作流步骤类型,指定 step-group 类型表示使用工作流子步骤,指定 'subSteps'字段执行子步骤,子步骤并行执行"
},
"Suspend the current workflow, it can be resumed by 'vela workflow resume' command": {
"Chinese": "暂停当前工作流,可以通过 'vela workflow resume' 继续已暂停的工作流"
},
"Specify the wait duration time to resume workflow such as \"30s\", \"1min\" or \"2m15s\"": {
"Chinese": "指定工作流暂停的时长,超过该时间后工作流将自动继续,如:\"30s\" \"1min\" \"2m15s\""
},
"Send a request to the specified Webhook URL. If no request body is specified, the current Application body will be sent by default": {
"Chinese": "向指定 Webhook URL 发送请求,若不指定请求体,则默认发送当前 Application"
},
"Specify the webhook url": {
"Chinese": "需要发送的 Webhook URL可以选择直接在 value 填写或从 secretRef 中获取"
},
"Specify the data you want to send": {
"Chinese": "需要发送的内容"
},
"name is the name of the secret": {
"Chinese": "Kubernetes Secret 名称"
},
"key is the key in the secret": {
"Chinese": "Kubernetes Secret 中的 key"
}
}

View File

@ -4,7 +4,7 @@ title: Built-in Component Type
This documentation will walk through all the built-in component types sorted alphabetically.
> It was generated automatically by [scripts](../../contributor/cli-ref-doc), please don't update manually, last updated at 2022-07-16T15:16:33+08:00.
> It was generated automatically by [scripts](../../contributor/cli-ref-doc), please don't update manually, last updated at 2022-07-24T21:02:31+08:00.
## Cron-Task
@ -38,18 +38,18 @@ spec:
cmd | Commands to run in the container. | []string | false |
env | Define arguments by using environment variables. | [[]env](#env-cron-task) | false |
schedule | Specify the schedule in Cron format, see https://en.wikipedia.org/wiki/Cron. | string | true |
concurrencyPolicy | Specifies how to treat concurrent executions of a Job. | string | true | Allow
suspend | Suspend subsequent executions. | bool | true | false
successfulJobsHistoryLimit | The number of successful finished jobs to retain. | int | true | 3
failedJobsHistoryLimit | The number of failed finished jobs to retain. | int | true | 1
concurrencyPolicy | Specifies how to treat concurrent executions of a Job. | string | false | Allow
suspend | Suspend subsequent executions. | bool | false | false
successfulJobsHistoryLimit | The number of successful finished jobs to retain. | int | false | 3
failedJobsHistoryLimit | The number of failed finished jobs to retain. | int | false | 1
startingDeadlineSeconds | Specify deadline in seconds for starting the job if it misses scheduled. | int | false |
labels | Specify the labels in the workload. | map[string]string | false |
annotations | Specify the annotations in the workload. | map[string]string | false |
count | Specify number of tasks to run in parallel. | int | true | 1
labels | Specify the labels in the workload. | map[string]:string | false |
annotations | Specify the annotations in the workload. | map[string]:string | false |
count | Specify number of tasks to run in parallel. | int | false | 1
ttlSecondsAfterFinished | Limits the lifetime of a Job that has finished. | int | false |
activeDeadlineSeconds | The duration in seconds relative to the startTime that the job may be continuously active before the system tries to terminate it. | int | false |
backoffLimit | The number of retries before marking this job failed. | int | true | 6
restart | Define the job restart policy, the value can only be Never or OnFailure. By default, it's Never. | string | true | Never
backoffLimit | The number of retries before marking this job failed. | int | false | 6
restart | Define the job restart policy, the value can only be Never or OnFailure. By default, it's Never. | string | false | Never
image | Which image would you like to use for your service. | string | true |
imagePullPolicy | Specify image pull policy for your service. | string | false |
cpu | Number of CPU units for the service, like `0.5` (0.5 CPU core), `1` (1 CPU core). | string | false |
@ -118,11 +118,11 @@ spec:
exec | Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute. | [exec](#exec-cron-task) | false |
httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute. | [httpGet](#httpget-cron-task) | false |
tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute. | [tcpSocket](#tcpsocket-cron-task) | false |
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | true | 0
periodSeconds | How often, in seconds, to execute the probe. | int | true | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | true | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | true | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | true | 3
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | false | 0
periodSeconds | How often, in seconds, to execute the probe. | int | false | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | false | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | false | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | false | 3
##### exec (cron-task)
@ -163,11 +163,11 @@ spec:
exec | Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute. | [exec](#exec-cron-task) | false |
httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute. | [httpGet](#httpget-cron-task) | false |
tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute. | [tcpSocket](#tcpsocket-cron-task) | false |
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | true | 0
periodSeconds | How often, in seconds, to execute the probe. | int | true | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | true | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | true | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | true | 3
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | false | 0
periodSeconds | How often, in seconds, to execute the probe. | int | false | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | false | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | false | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | false | 3
##### exec (cron-task)
@ -266,8 +266,8 @@ spec:
cmd | Commands to run in the container. | []string | false |
env | Define arguments by using environment variables. | [[]env](#env-daemon) | false |
volumeMounts | | [volumeMounts](#volumemounts-daemon) | false |
labels | Specify the labels in the workload. | map[string]string | false |
annotations | Specify the annotations in the workload. | map[string]string | false |
labels | Specify the labels in the workload. | map[string]:string | false |
annotations | Specify the annotations in the workload. | map[string]:string | false |
image | Which image would you like to use for your service. | string | true |
ports | Which ports do you want customer traffic sent to, defaults to 80. | [[]ports](#ports-daemon) | false |
imagePullPolicy | Specify image pull policy for your service. | string | false |
@ -339,7 +339,7 @@ spec:
---- | ----------- | ---- | -------- | -------
name | | string | true |
mountPath | | string | true |
defaultMode | | int | true | 420
defaultMode | | int | false | 420
cmName | | string | true |
items | | [[]items](#items-daemon) | false |
@ -350,7 +350,7 @@ spec:
---- | ----------- | ---- | -------- | -------
path | | string | true |
key | | string | true |
mode | | int | true | 511
mode | | int | false | 511
##### secret (daemon)
@ -359,7 +359,7 @@ spec:
---- | ----------- | ---- | -------- | -------
name | | string | true |
mountPath | | string | true |
defaultMode | | int | true | 420
defaultMode | | int | false | 420
items | | [[]items](#items-daemon) | false |
secretName | | string | true |
@ -370,7 +370,7 @@ spec:
---- | ----------- | ---- | -------- | -------
path | | string | true |
key | | string | true |
mode | | int | true | 511
mode | | int | false | 511
##### emptyDir (daemon)
@ -379,7 +379,7 @@ spec:
---- | ----------- | ---- | -------- | -------
name | | string | true |
mountPath | | string | true |
medium | | string | true | empty
medium | | string | false | empty
##### hostPath (daemon)
@ -399,8 +399,8 @@ spec:
---- | ----------- | ---- | -------- | -------
name | Name of the port. | string | false |
port | Number of port to expose on the pod's IP address. | int | true |
protocol | Protocol for port. Must be UDP, TCP, or SCTP. | string | true | TCP
expose | Specify if the port should be exposed. | bool | true | false
protocol | Protocol for port. Must be UDP, TCP, or SCTP. | string | false | TCP
expose | Specify if the port should be exposed. | bool | false | false
#### volumes (daemon)
@ -419,11 +419,11 @@ spec:
exec | Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute. | [exec](#exec-daemon) | false |
httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute. | [httpGet](#httpget-daemon) | false |
tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute. | [tcpSocket](#tcpsocket-daemon) | false |
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | true | 0
periodSeconds | How often, in seconds, to execute the probe. | int | true | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | true | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | true | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | true | 3
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | false | 0
periodSeconds | How often, in seconds, to execute the probe. | int | false | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | false | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | false | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | false | 3
##### exec (daemon)
@ -466,11 +466,11 @@ spec:
exec | Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute. | [exec](#exec-daemon) | false |
httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute. | [httpGet](#httpget-daemon) | false |
tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute. | [tcpSocket](#tcpsocket-daemon) | false |
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | true | 0
periodSeconds | How often, in seconds, to execute the probe. | int | true | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | true | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | true | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | true | 3
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | false | 0
periodSeconds | How often, in seconds, to execute the probe. | int | false | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | false | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | false | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | false | 3
##### exec (daemon)
@ -583,10 +583,10 @@ spec:
---- | ----------- | ---- | -------- | -------
cmd | Commands to run in the container. | []string | false |
env | Define arguments by using environment variables. | [[]env](#env-task) | false |
count | Specify number of tasks to run in parallel. | int | true | 1
labels | Specify the labels in the workload. | map[string]string | false |
annotations | Specify the annotations in the workload. | map[string]string | false |
restart | Define the job restart policy, the value can only be Never or OnFailure. By default, it's Never. | string | true | Never
count | Specify number of tasks to run in parallel. | int | false | 1
labels | Specify the labels in the workload. | map[string]:string | false |
annotations | Specify the annotations in the workload. | map[string]:string | false |
restart | Define the job restart policy, the value can only be Never or OnFailure. By default, it's Never. | string | false | Never
image | Which image would you like to use for your service. | string | true |
imagePullPolicy | Specify image pull policy for your service. | string | false |
cpu | Number of CPU units for the service, like `0.5` (0.5 CPU core), `1` (1 CPU core). | string | false |
@ -646,11 +646,11 @@ spec:
exec | Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute. | [exec](#exec-task) | false |
httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute. | [httpGet](#httpget-task) | false |
tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute. | [tcpSocket](#tcpsocket-task) | false |
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | true | 0
periodSeconds | How often, in seconds, to execute the probe. | int | true | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | true | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | true | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | true | 3
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | false | 0
periodSeconds | How often, in seconds, to execute the probe. | int | false | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | false | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | false | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | false | 3
##### exec (task)
@ -691,11 +691,11 @@ spec:
exec | Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute. | [exec](#exec-task) | false |
httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute. | [httpGet](#httpget-task) | false |
tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute. | [tcpSocket](#tcpsocket-task) | false |
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | true | 0
periodSeconds | How often, in seconds, to execute the probe. | int | true | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | true | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | true | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | true | 3
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | false | 0
periodSeconds | How often, in seconds, to execute the probe. | int | false | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | false | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | false | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | false | 3
##### exec (task)
@ -771,8 +771,8 @@ spec:
cmd | Commands to run in the container. | []string | false |
env | Define arguments by using environment variables. | [[]env](#env-webservice) | false |
volumeMounts | | [volumeMounts](#volumemounts-webservice) | false |
labels | Specify the labels in the workload. | map[string]string | false |
annotations | Specify the annotations in the workload. | map[string]string | false |
labels | Specify the labels in the workload. | map[string]:string | false |
annotations | Specify the annotations in the workload. | map[string]:string | false |
image | Which image would you like to use for your service. | string | true |
ports | Which ports do you want customer traffic sent to, defaults to 80. | [[]ports](#ports-webservice) | false |
imagePullPolicy | Specify image pull policy for your service. | string | false |
@ -844,7 +844,7 @@ spec:
---- | ----------- | ---- | -------- | -------
name | | string | true |
mountPath | | string | true |
defaultMode | | int | true | 420
defaultMode | | int | false | 420
cmName | | string | true |
items | | [[]items](#items-webservice) | false |
@ -855,7 +855,7 @@ spec:
---- | ----------- | ---- | -------- | -------
path | | string | true |
key | | string | true |
mode | | int | true | 511
mode | | int | false | 511
##### secret (webservice)
@ -864,7 +864,7 @@ spec:
---- | ----------- | ---- | -------- | -------
name | | string | true |
mountPath | | string | true |
defaultMode | | int | true | 420
defaultMode | | int | false | 420
items | | [[]items](#items-webservice) | false |
secretName | | string | true |
@ -875,7 +875,7 @@ spec:
---- | ----------- | ---- | -------- | -------
path | | string | true |
key | | string | true |
mode | | int | true | 511
mode | | int | false | 511
##### emptyDir (webservice)
@ -884,7 +884,7 @@ spec:
---- | ----------- | ---- | -------- | -------
name | | string | true |
mountPath | | string | true |
medium | | string | true | empty
medium | | string | false | empty
##### hostPath (webservice)
@ -902,8 +902,8 @@ spec:
---- | ----------- | ---- | -------- | -------
name | Name of the port. | string | false |
port | Number of port to expose on the pod's IP address. | int | true |
protocol | Protocol for port. Must be UDP, TCP, or SCTP. | string | true | TCP
expose | Specify if the port should be exposed. | bool | true | false
protocol | Protocol for port. Must be UDP, TCP, or SCTP. | string | false | TCP
expose | Specify if the port should be exposed. | bool | false | false
#### volumes (webservice)
@ -922,11 +922,11 @@ spec:
exec | Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute. | [exec](#exec-webservice) | false |
httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute. | [httpGet](#httpget-webservice) | false |
tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute. | [tcpSocket](#tcpsocket-webservice) | false |
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | true | 0
periodSeconds | How often, in seconds, to execute the probe. | int | true | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | true | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | true | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | true | 3
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | false | 0
periodSeconds | How often, in seconds, to execute the probe. | int | false | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | false | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | false | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | false | 3
##### exec (webservice)
@ -969,11 +969,11 @@ spec:
exec | Instructions for assessing container health by executing a command. Either this attribute or the httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the httpGet attribute and the tcpSocket attribute. | [exec](#exec-webservice) | false |
httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute or the exec attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the tcpSocket attribute. | [httpGet](#httpget-webservice) | false |
tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with both the exec attribute and the httpGet attribute. | [tcpSocket](#tcpsocket-webservice) | false |
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | true | 0
periodSeconds | How often, in seconds, to execute the probe. | int | true | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | true | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | true | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | true | 3
initialDelaySeconds | Number of seconds after the container is started before the first probe is initiated. | int | false | 0
periodSeconds | How often, in seconds, to execute the probe. | int | false | 10
timeoutSeconds | Number of seconds after which the probe times out. | int | false | 1
successThreshold | Minimum consecutive successes for the probe to be considered successful after having failed. | int | false | 1
failureThreshold | Number of consecutive failures required to determine the container is not alive (liveness probe) or not ready (readiness probe). | int | false | 3
##### exec (webservice)

View File

@ -4,7 +4,7 @@ title: Built-in Policy Type
This documentation will walk through all the built-in policy types sorted alphabetically.
> It was generated automatically by [scripts](../../contributor/cli-ref-doc), please don't update manually, last updated at 2022-07-23T15:27:57+08:00.
> It was generated automatically by [scripts](../../contributor/cli-ref-doc), please don't update manually, last updated at 2022-07-24T21:01:20+08:00.
## Apply-Once
@ -14,7 +14,7 @@ Allow configuration drift for applied resources, delivery the resource without c
### Examples (apply-once)
It's generally used in [one time delivery only without continuous management](../policies/apply-once) scenario.
It's generally used in [one time delivery only without continuous management](https://kubevela.io/docs/end-user/policies/apply-once) scenario.
```yaml
apiVersion: core.oam.dev/v1beta1
@ -43,7 +43,7 @@ spec:
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
enable | Whether to enable apply-once for the whole application. | bool | true | false
enable | Whether to enable apply-once for the whole application. | bool | false | false
rules | Specify the rules for configuring apply-once policy in resource level. | [[]rules](#rules-apply-once) | false |
@ -82,7 +82,7 @@ Configure the garbage collect behaviour for the application.
### Examples (garbage-collect)
It's used in [garbage collection](../policies/gc) scenario. It can be used to configure the collection policy, e.g. don't delete the legacy resources when updating.
It's used in [garbage collection](https://kubevela.io/docs/end-user/policies/gc) scenario. It can be used to configure the collection policy, e.g. don't delete the legacy resources when updating.
```yaml
apiVersion: core.oam.dev/v1beta1
@ -140,7 +140,7 @@ spec:
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
keepLegacyResource | If is set, outdated versioned resourcetracker will not be recycled automatically, outdated resources will be kept until resourcetracker be deleted manually. | bool | true | false
keepLegacyResource | If is set, outdated versioned resourcetracker will not be recycled automatically, outdated resources will be kept until resourcetracker be deleted manually. | bool | false | false
rules | Specify the list of rules to control gc strategy at resource level, if one resource is controlled by multiple rules, first rule will be used. | [[]rules](#rules-garbage-collect) | false |
@ -149,7 +149,7 @@ spec:
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
selector | Specify how to select the targets of the rule. | [[]selector](#selector-garbage-collect) | true |
strategy | Specify the strategy for target resource to recycle. | string | true | onAppUpdate
strategy | Specify the strategy for target resource to recycle. | string | false | onAppUpdate
##### selector (garbage-collect)
@ -175,8 +175,8 @@ Apply periodical health checking to the application.
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
probeTimeout | Specify health checking timeout(seconds), default 10s. | int | true | 10
probeInterval | Specify health checking interval(seconds), default 30s. | int | true | 30
probeTimeout | Specify health checking timeout(seconds), default 10s. | int | false | 10
probeInterval | Specify health checking interval(seconds), default 30s. | int | false | 30
## Override
@ -315,7 +315,7 @@ spec:
---- | ----------- | ---- | -------- | -------
type | Specify the type of the trait to be patched. | string | true |
properties | Specify the properties to override. | map[string]:(null\|bool\|string\|bytes\|{...}\|[...]\|number) | false |
disable | Specify if the trait should be remove, default false. | bool | true | false
disable | Specify if the trait should be remove, default false. | bool | false | false
## Topology

View File

@ -1,24 +1,143 @@
---
title: Built-in Workflow Steps
title: Built-in WorkflowStep Type
---
This documentation will walk through the built-in workflow steps that you can use to design an application deployment process.
This documentation will walk through all the built-in workflow step types sorted alphabetically.
## deploy
> It was generated automatically by [scripts](../../contributor/cli-ref-doc), please don't update manually, last updated at 2022-07-24T20:59:39+08:00.
**Overview**
## Apply-Object
Deploy components with policies.
### Description
**Parameter**
Apply raw kubernetes objects for your workflow steps.
| Name | Type | Description |
| :-------: | :----: | :-----------------------------------: |
| auto | bool | Optional, default to true. If set to false, the workflow will suspend automatically before this step. |
| policies | []string | Optional, the policies that used for this deployment. If not specified, the components will be deployed to the hub cluster. |
| parallelism | int | Optional, defaults to 5. |
### Examples (apply-object)
**Example**
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: server-with-pvc
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
volumes:
- name: "my-pvc"
type: "pvc"
mountPath: "/test"
claimName: "myclaim"
workflow:
steps:
- name: apply-pvc
type: apply-object
properties:
# Kubernetes native resources fields
value:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: myclaim
namespace: default
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 8Gi
storageClassName: standard
# the cluster you want to apply the resource to, default is the current cluster
cluster: <your cluster name>
- name: apply-server
type: apply-component
properties:
component: express-serve
```
### Specification (apply-object)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
value | Specify Kubernetes native resource object to be applied. | map[string]:(null\|bool\|string\|bytes\|{...}\|[...]\|number) | true |
cluster | The cluster you want to apply the resource to, default is the current control plane cluster. | string | false | empty
## Depends-On-App
### Description
Wait for the specified Application to complete.
### Examples (depends-on-app)
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: first-vela-workflow
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
traits:
- type: ingress
properties:
domain: testsvc.example.com
http:
/: 8000
workflow:
steps:
- name: express-server
type: depends-on-app
properties:
name: another-app
namespace: default
```
`depends-on-app` will check if the cluster has the application with `name` and `namespace` given in properties.
If the application exists, it will hang the next step until the application is running.
If the application does not exist, KubeVela will check the ConfigMap with the same name, and read the config of the Application and apply to cluster.
The ConfigMap is like below: the `name` and `namespace` of the ConfigMap is the same in properties.
In data, the `key` must be specified by `application`, and the `value` is the yaml of the deployed application yaml.
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: myapp
namespace: vela-system
data:
application:
<app yaml file>
```
### Specification (depends-on-app)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
name | Specify the name of the dependent Application. | string | true |
namespace | Specify the namespace of the dependent Application. | string | true |
## Deploy
### Description
A powerful and unified deploy step for components multi-cluster delivery with policies.
### Examples (deploy)
```yaml
apiVersion: core.oam.dev/v1beta1
@ -57,29 +176,45 @@ spec:
policies: ["topology-hangzhou-clusters"]
```
## suspend
### Specification (deploy)
**Overview**
Suspend the current workflow, we can use `vela workflow resume appname` to resume the suspended workflow.
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
policies | Declare the policies that used for this deployment. If not specified, the components will be deployed to the hub cluster. | []string | false |
parallelism | Maximum number of concurrent delivered components. | int | false | 5
ignoreTerraformComponent | If set false, this step will apply the components with the terraform workload. | bool | false | true
auto | If set to false, the workflow will suspend automatically before this step, default to be true. | bool | false | true
> For more information of `vela workflow`, please refer to [vela cli](../../cli/vela_workflow)。
**Parameter**
## Deploy-Cloud-Resource
> Notice that you need to upgrade to KubeVela v1.4 or higher to use `duration` parameter.
### Description
| Name | Type | Description |
| :---: | :---: | :---------: |
| duration | string | Optional, the wait duration time to resume workflow such as "30s", "1min" or "2m15s" |
Deploy cloud resource and deliver secret to multi clusters.
**Example**
### Specification (deploy-cloud-resource)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
env | Declare the name of the env in policy. | string | true |
policy | Declare the name of the env-binding policy, if empty, the first env-binding policy will be used. | string | false | empty
## Export2config
### Description
Export data to specified Kubernetes ConfigMap in your workflow.
### Examples (export2config)
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: first-vela-workflow
name: export-config
namespace: default
spec:
components:
@ -90,59 +225,110 @@ spec:
port: 8000
workflow:
steps:
- name: slack-message
type: webhook-notification
- name: apply-server
type: apply-component
outputs:
- name: status
valueFrom: output.status.conditions[0].message
properties:
slack:
# the Slack webhook address, please refer to: https://api.slack.com/messaging/webhooks
message:
text: Ready to apply the application, ask the administrator to approve and resume the workflow.
- name: manual-approval
type: suspend
# properties:
# duration: "30s"
- name: express-server
type: apply-application
component: express-server
- name: export-config
type: export-config
inputs:
- from: status
parameterKey: data.serverstatus
properties:
configName: my-configmap
data:
testkey: testvalue
```
## notification
### Specification (export2config)
**Overview**
Send notifications. You can use the notification to send notifications to Email, DingTalk, Slack, Lark.
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
cluster | Specify the cluster of the config map. | string | false | empty
namespace | Specify the namespace of the config map. | string | false |
data | Specify the data of config map. | {...} | true |
configName | Specify the name of the config map. | string | true |
**Parameters**
| Name | Type | Description |
| :--------------: | :----: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| email | Object | Optional, please fulfill its from, to and content if you want to send email |
| email.from.address | String | Required, the email address that you want to send from |
| email.from.alias | String | Optional, the email alias to show after sending the email |
| email.from.password | ValueOrSecret | Required, the password of the email, you can either specify it in value or use secretRef |
| email.from.host | String | Required, the host of your email |
| email.from.port | Int | Optional, the port of the email host, default to 587 |
| email.to | []String | Required, the email address that you want to send to |
| email.content.subject | String | Required, the subject of the email |
| email.content.body | String | Required, the context body of the email |
| slack | Object | Optional, please fulfill its url and message if you want to send Slack messages |
| slack.url | ValueOrSecret | Required, the webhook address of Slack, you can choose to fill it directly in value or specify it in secret |
| slack.message | Object | Required, the Slack messages you want to send, please follow [Slack messaging](https://api.slack.com/reference/messaging/payload) |
| dingding | Object | Optional, please fulfill its url and message if you want to send DingTalk messages |
| dingding.url | ValueOrSecret | Required, the webhook address of DingTalk, you can choose to fill it directly in value or specify it in secret |
| dingding.message | Object | Required, the DingTalk messages you want to send, please follow [DingTalk messaging](https://developers.dingtalk.com/document/robots/custom-robot-access/title-72m-8ag-pqw) | |
| lark | Object | Optional, please fulfill its url and message if you want to send Lark messages |
| lark.url | ValueOrSecret | Required, the webhook address of Lark, you can choose to fill it directly in value or specify it in secret |
| lark.message | Object | Required, the Lark messages you want to send, please follow [Lark messaging](https://open.feishu.cn/document/ukTMukTMukTM/ucTM5YjL3ETO24yNxkjN#8b0f2a1b) | |
## Export2secret
The `ValueOrSecret` format is:
### Description
| Name | Type | Description |
| :--------------: | :----: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| value | String | Optional, directly get the data from value |
| secretRef.name | String | Optional, get data from secret, the name of the secret |
| secretRef.key | String | Optional, get data from secret, the key of the secret |
Export data to Kubernetes Secret in your workflow.
**Example**
### Examples (export2secret)
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: export-secret
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
workflow:
steps:
- name: apply-server
type: apply-component
outputs:
- name: status
valueFrom: output.status.conditions[0].message
properties:
component: express-server
- name: export-secret
type: export-secret
inputs:
- from: status
parameterKey: data.serverstatus
properties:
secretName: my-secret
data:
testkey: testvalue
```
### Specification (export2secret)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
cluster | Specify the cluster of the secret. | string | false | empty
namespace | Specify the namespace of the secret. | string | false |
type | Specify the type of the secret. | string | false |
secretName | Specify the name of the secret. | string | true |
data | Specify the data of secret. | {...} | true |
## Generate-Jdbc-Connection
### Description
Generate a JDBC connection based on Component of alibaba-rds.
### Specification (generate-jdbc-connection)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
name | Specify the name of the secret generated by database component. | string | true |
namespace | Specify the namespace of the secret generated by database component. | string | false |
## Notification
### Description
Send notifications to Email, DingTalk, Slack, Lark or webhook in your workflow.
### Examples (notification)
```yaml
apiVersion: core.oam.dev/v1beta1
@ -214,221 +400,200 @@ spec:
body: test-body
```
* Expected outcome
**Expected outcome**
we can see that before and after the deployment of the application, the messages can be seen in the corresponding group chat.
We can see that before and after the deployment of the application, the messages can be seen in the corresponding group chat.
## webhook
### Specification (notification)
**Overview**
Send a request to the specified Webhook URL. If no request body is specified, the current Application body will be sent by default.
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
lark | Please fulfill its url and message if you want to send Lark messages. | [lark](#lark-notification) | false |
slack | Please fulfill its url and message if you want to send Slack messages. | [slack](#slack-notification) | false |
email | Please fulfill its from, to and content if you want to send email. | [email](#email-notification) | false |
dingding | Please fulfill its url and message if you want to send DingTalk messages. | [dingding](#dingding-notification) | false |
**Parameter**
| Name | Type | Description |
| :-------: | :----: | :-----------------------------------: |
| url | ValueOrSecret | Required, Webhook URL to be sent, you can choose to fill in value directly or get it from secretRef |
| data | object | Optional, the data that needs to be sent |
#### lark (notification)
**Example**
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
url | Specify the the lark url, you can either sepcify it in value or use secretRef. | [url-option-0](#url-option-0-notification) or [url-option-1](#url-option-1-notification) | true |
message | Specify the message that you want to sent, refer to [Lark messaging](https://open.feishu.cn/document/ukTMukTMukTM/ucTM5YjL3ETO24yNxkjN#8b0f2a1b). | [message](#message-notification) | true |
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: first-vela-workflow
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
workflow:
steps:
- name: express-server
type: apply-application
- name: webhook
type: webhook
properties:
url:
value: <your webhook url>
```
## apply-application
##### url-option-0 (notification)
**Overview**
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
value | the url address content in string. | string | true |
Apply all components and traits in Application.
**Parameter**
##### url-option-1 (notification)
No arguments, used for custom steps before or after application applied.
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
secretRef | | [secretRef](#secretref-notification) | true |
**Example**
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: first-vela-workflow
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
traits:
- type: ingress
properties:
domain: testsvc.example.com
http:
/: 8000
workflow:
steps:
- name: express-server
type: apply-application
```
##### secretRef (notification)
## depends-on-app
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
name | name is the name of the secret. | string | true |
key | key is the key in the secret. | string | true |
**Overview**
Wait for the specified Application to complete.
##### message (notification)
> `depends-on-app` will check if the cluster has the application with `name` and `namespace` defines in `properties`.
> If the application exists, the next step will be executed after the application is running.
> If the application do not exists, KubeVela will check the ConfigMap with the same name, and read the config of the Application and apply to cluster.
> The ConfigMap is like below: the `name` and `namespace` of the ConfigMap is the same in properties. In data, the key is `name`, and the value is the yaml of the deployed application yaml.
> ```yaml
> apiVersion: v1
> kind: ConfigMap
> metadata:
> name: myapp
> namespace: vela-system
> data:
> myapp: ...
> ```
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
content | content should be json encode string. | string | true |
msg_type | msg_type can be text, post, image, interactive, share_chat, share_user, audio, media, file, sticker. | string | true |
**Parameter**
| Name | Type | Description |
| :-------: | :----: | :------------------------------: |
| name | string | The name of the Application |
| namespace | string | The namespace of the Application |
#### slack (notification)
**Example**
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
url | Specify the the slack url, you can either sepcify it in value or use secretRef. | [url-option-0](#url-option-0-notification) or [url-option-1](#url-option-1-notification) | true |
message | Specify the message that you want to sent, refer to [slack messaging](https://api.slack.com/reference/messaging/payload). | [message](#message-notification) | true |
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: first-vela-workflow
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
traits:
- type: ingress
properties:
domain: testsvc.example.com
http:
/: 8000
workflow:
steps:
- name: express-server
type: depends-on-app
properties:
name: another-app
namespace: default
```
## apply-object
##### url-option-0 (notification)
**Overview**
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
value | the url address content in string. | string | true |
Apply Kubernetes native resources, you need to upgrade to KubeVela v1.1.4 or higher to enable `apply-object`.
**Parameters**
##### url-option-1 (notification)
| Name | Type | Description |
| :-------: | :----: | :-----------------------------------: |
| value | Object | Required, Kubernetes native resources fields |
| cluster | String | Optional, The cluster you want to apply the resource to, default is the current cluster. If you want to apply resource in different cluster, use `vela cluster join` to join the cluster first, and then specify the cluster |
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
secretRef | | [secretRef](#secretref-notification) | true |
**Example**
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: server-with-pvc
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
volumes:
- name: "my-pvc"
type: "pvc"
mountPath: "/test"
claimName: "myclaim"
##### secretRef (notification)
workflow:
steps:
- name: apply-pvc
type: apply-object
properties:
# Kubernetes native resources fields
value:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: myclaim
namespace: default
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 8Gi
storageClassName: standard
# the cluster you want to apply the resource to, default is the current cluster
cluster: <your cluster name>
- name: apply-server
type: apply-component
properties:
component: express-serve
```
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
name | name is the name of the secret. | string | true |
key | key is the key in the secret. | string | true |
## read-object
**Overview**
##### message (notification)
Read Kubernetes native resources, you need to upgrade to KubeVela v1.1.6 or higher to enable `read-object`.
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
text | Specify the message text for slack notification. | string | true |
blocks | | (null\|[...]) | false |
attachments | | (null\|{...}) | false |
thread_ts | | string | false |
mrkdwn | Specify the message text format in markdown for slack notification. | bool | false | true
**Parameters**
| Name | Type | Description |
| :-------: | :----: | :-----------------------------------: |
| apiVersion | String | Required, The apiVersion of the resource you want to read |
| kind | String | Required, The kind of the resource you want to read |
| name | String | Required, The apiVersion of the resource you want to read |
| namespace | String | Optional, The namespace of the resource you want to read, defaults to `default` |
| cluster | String | Optional, The cluster you want to read the resource from, default is the current cluster. If you want to read resource in different cluster, use `vela cluster join` to join the cluster first, and then specify the cluster |
#### email (notification)
**Example**
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
content | Specify the content of the email. | [content](#content-notification) | true |
from | Specify the email info that you want to send from. | [from](#from-notification) | true |
to | Specify the email address that you want to send to. | []string | true |
##### content (notification)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
body | Specify the context body of the email. | string | true |
subject | Specify the subject of the email. | string | true |
##### from (notification)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
address | Specify the email address that you want to send from. | string | true |
alias | The alias is the email alias to show after sending the email. | string | false |
password | Specify the password of the email, you can either sepcify it in value or use secretRef. | [password-option-0](#password-option-0-notification) or [password-option-1](#password-option-1-notification) | true |
host | Specify the host of your email. | string | true |
port | Specify the port of the email host, default to 587. | int | false | 587
##### password-option-0 (notification)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
value | the password content in string. | string | true |
##### password-option-1 (notification)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
secretRef | | [secretRef](#secretref-notification) | true |
##### secretRef (notification)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
name | name is the name of the secret. | string | true |
key | key is the key in the secret. | string | true |
#### dingding (notification)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
url | Specify the the dingding url, you can either sepcify it in value or use secretRef. | [url-option-0](#url-option-0-notification) or [url-option-1](#url-option-1-notification) | true |
message | Specify the message that you want to sent, refer to [dingtalk messaging](https://developers.dingtalk.com/document/robots/custom-robot-access/title-72m-8ag-pqw). | [message](#message-notification) | true |
##### url-option-0 (notification)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
value | the url address content in string. | string | true |
##### url-option-1 (notification)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
secretRef | | [secretRef](#secretref-notification) | true |
##### secretRef (notification)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
name | name is the name of the secret. | string | true |
key | key is the key in the secret. | string | true |
##### message (notification)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
text | Specify the message content of dingtalk notification. | (null\|{...}) | false |
msgtype | msgType can be text, link, mardown, actionCard, feedCard. | string | false | text
link | | (null\|{...}) | false |
markdown | | (null\|{...}) | false |
at | | (null\|{...}) | false |
actionCard | | (null\|{...}) | false |
feedCard | | (null\|{...}) | false |
## Read-Object
### Description
Read Kubernetes objects from cluster for your workflow steps.
### Examples (read-object)
```yaml
apiVersion: core.oam.dev/v1beta1
@ -468,27 +633,102 @@ spec:
component: express-server
```
## export2config
### Specification (read-object)
**Overview**
Export data to ConfigMap, you need to upgrade to KubeVela v1.1.6 or higher to enable `export2config`.
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
name | Specify the name of the object. | string | true |
cluster | The cluster you want to apply the resource to, default is the current control plane cluster. | string | false | empty
apiVersion | Specify the apiVersion of the object, defaults to 'core.oam.dev/v1beta1'. | string | false |
kind | Specify the kind of the object, defaults to Application. | string | false |
namespace | The namespace of the resource you want to read. | string | false | default
**Parameters**
| Name | Type | Description |
| :-------: | :----: | :-----------------------------------: |
| configName | String | Required, The name of the ConfigMap |
| namespace | String | Optional, The namespace of the ConfigMap, defaults to `context.namespace` |
| data | Map | Required, The data that you want to export to ConfigMap |
## Share-Cloud-Resource
**Example**
### Description
Sync secrets created by terraform component to runtime clusters so that runtime clusters can share the created cloud resource.
### Specification (share-cloud-resource)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
env | Declare the name of the env in policy. | string | true |
policy | Declare the name of the env-binding policy, if empty, the first env-binding policy will be used. | string | false | empty
placements | Declare the location to bind. | [[]placements](#placements-share-cloud-resource) | true |
#### placements (share-cloud-resource)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
cluster | | string | false |
namespace | | string | false |
## Step-Group
### Description
A special step that you can declare 'subSteps' in it, 'subSteps' is an array containing any step type whose valid parameters do not include the `step-group` step type itself. The sub steps were executed in parallel.
### Examples (step-group)
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: export-config
name: example
namespace: default
spec:
components:
- name: express-server
type: webservice
properties:
image: crccheck/hello-world
port: 8000
- name: express-server2
type: webservice
properties:
image: crccheck/hello-world
port: 8000
workflow:
steps:
- name: step
type: step-group
subSteps:
- name: apply-sub-step1
type: apply-component
properties:
component: express-server
- name: apply-sub-step2
type: apply-component
properties:
component: express-server2
```
### Specification (step-group)
This capability has no arguments.
## Suspend
### Description
Suspend the current workflow, it can be resumed by 'vela workflow resume' command.
### Examples (suspend)
The `duration` parameter is supported in KubeVela v1.4 or higher.
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: first-vela-workflow
namespace: default
spec:
components:
@ -499,45 +739,42 @@ spec:
port: 8000
workflow:
steps:
- name: apply-server
type: apply-component
outputs:
- name: status
valueFrom: output.status.conditions[0].message
- name: slack-message
type: webhook-notification
properties:
component: express-server
- name: export-config
type: export-config
inputs:
- from: status
parameterKey: data.serverstatus
properties:
configName: my-configmap
data:
testkey: testvalue
slack:
# the Slack webhook address, please refer to: https://api.slack.com/messaging/webhooks
message:
text: Ready to apply the application, ask the administrator to approve and resume the workflow.
- name: manual-approval
type: suspend
# properties:
# duration: "30s"
- name: express-server
type: apply-application
```
## export2secret
### Specification (suspend)
**Overview**
Export data to Secret, you need to upgrade to KubeVela v1.1.6 or higher to enable `export2secret`.
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
duration | Specify the wait duration time to resume workflow such as "30s", "1min" or "2m15s". | string | false |
**Parameters**
| Name | Type | Description |
| :-------: | :----: | :-----------------------------------: |
| secretName | String | Required, The name of the Secret |
| namespace | String | Optional, The namespace of the Secret, defaults to `context.namespace` |
| data | Map | Required, The data that you want to export to Secret |
## Webhook
**Example**
### Description
Send a request to the specified Webhook URL. If no request body is specified, the current Application body will be sent by default.
### Examples (webhook)
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: export-secret
name: first-vela-workflow
namespace: default
spec:
components:
@ -548,20 +785,43 @@ spec:
port: 8000
workflow:
steps:
- name: apply-server
type: apply-component
outputs:
- name: status
valueFrom: output.status.conditions[0].message
- name: express-server
type: apply-application
- name: webhook
type: webhook
properties:
component: express-server
- name: export-secret
type: export-secret
inputs:
- from: status
parameterKey: data.serverstatus
properties:
secretName: my-secret
data:
testkey: testvalue
url:
value: <your webhook url>
```
### Specification (webhook)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
url | Specify the webhook url. | [url-option-0](#url-option-0-webhook) or [url-option-1](#url-option-1-webhook) | true |
data | Specify the data you want to send. | map[string]:(null\|bool\|string\|bytes\|{...}\|[...]\|number) | false |
#### url-option-0 (webhook)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
value | | string | true |
#### url-option-1 (webhook)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
secretRef | | [secretRef](#secretref-webhook) | true |
##### secretRef (webhook)
Name | Description | Type | Required | Default
---- | ----------- | ---- | -------- | -------
name | name is the name of the secret. | string | true |
key | key is the key in the secret. | string | true |