diff --git a/docs/end-user/canary-blue-green.md b/docs/end-user/canary-blue-green.md new file mode 100644 index 00000000..14b7c71b --- /dev/null +++ b/docs/end-user/canary-blue-green.md @@ -0,0 +1,5 @@ +--- +title: 金丝雀发布、蓝绿发布、多泳道发布 +--- + +WIP diff --git a/docs/end-user/component-dependency-parameter.md b/docs/end-user/component-dependency-parameter.md new file mode 100644 index 00000000..7829f65c --- /dev/null +++ b/docs/end-user/component-dependency-parameter.md @@ -0,0 +1,5 @@ +--- +title: 应用组件间的依赖和参数传递 +--- + +WIP \ No newline at end of file diff --git a/docs/end-user/component-observability.md b/docs/end-user/component-observability.md new file mode 100644 index 00000000..ca322c44 --- /dev/null +++ b/docs/end-user/component-observability.md @@ -0,0 +1,5 @@ +--- +title: 组件可观测性 +--- + +WIP \ No newline at end of file diff --git a/docs/end-user/multi-app-env-cluster.md b/docs/end-user/multi-app-env-cluster.md new file mode 100644 index 00000000..c64fa70f --- /dev/null +++ b/docs/end-user/multi-app-env-cluster.md @@ -0,0 +1,5 @@ +--- +title: 多应用、多环境、多集群编排 +--- + +WIP \ No newline at end of file diff --git a/docs/end-user/rollout-scaler.md b/docs/end-user/rollout-scaler.md new file mode 100644 index 00000000..537beacc --- /dev/null +++ b/docs/end-user/rollout-scaler.md @@ -0,0 +1,5 @@ +--- +title: Rollout & Scaler +--- + +WIP \ No newline at end of file diff --git a/docs/platform-engineers/components/built-in/alicloud-ack.md b/docs/platform-engineers/components/built-in/alicloud-ack.md new file mode 100644 index 00000000..9b881dbf --- /dev/null +++ b/docs/platform-engineers/components/built-in/alicloud-ack.md @@ -0,0 +1,6 @@ +--- +title: AliCloud ACK + +--- + +WIP \ No newline at end of file diff --git a/docs/platform-engineers/components/built-in/alicloud-oss.md b/docs/platform-engineers/components/built-in/alicloud-oss.md new file mode 100644 index 00000000..b45cc33a --- /dev/null +++ b/docs/platform-engineers/components/built-in/alicloud-oss.md @@ -0,0 +1,5 @@ +--- +title: AliCloud OSS +--- + +WIP \ No newline at end of file diff --git a/docs/platform-engineers/components/built-in/alicloud-rds.md b/docs/platform-engineers/components/built-in/alicloud-rds.md new file mode 100644 index 00000000..288d1e33 --- /dev/null +++ b/docs/platform-engineers/components/built-in/alicloud-rds.md @@ -0,0 +1,5 @@ +--- +title: AliCloudRDS +--- + +WIP \ No newline at end of file diff --git a/docs/platform-engineers/components/built-in/helm.md b/docs/platform-engineers/components/built-in/helm.md new file mode 100644 index 00000000..71b98fc1 --- /dev/null +++ b/docs/platform-engineers/components/built-in/helm.md @@ -0,0 +1,119 @@ +--- +title: Helm +--- + +Create a Helm Component, it could be from Helm Repo, Git Repo or OSS bucket. + +## From Helm Repo + +| Parameters | Description | Example | +| --------------- | ------------------------------------------------------------ | ---------------------------------- | +| repoType | required, indicates where it's from | Helm | +| pullInterval | optional, synchronize with Helm Repo, tunning interval and 5 minutes by default | 10m | +| url | required, Helm Reop address, it supports http/https | https://charts.bitnami.com/bitnami | +| secretRef | optional, The name of the Secret object that holds the credentials required to pull the repo. The username and password fields must be included in the HTTP/S basic authentication Secret. For TLS the secret must contain a certFile and keyFile, and/or caCert fields. For TLS authentication, the secret must contain a certFile / keyFile field and/or caCert field. | sec-name | +| timeout | optional, timeout for pulling repo index | 60s | +| chart | required, chart title | redis-cluster | +| version | optional, chart version, * by default | 6.2.7 | +| targetNamespace | optional, the namespace to install chart, decided by chart itself | your-ns | +| releaseName | optional, release name after installed | your-rn | +| values | optional, override the Values.yaml inchart, using for the rendering of Helm | | + +**How-to** +```yaml +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: app-delivering-chart +spec: + components: + - name: redis-comp + type: helm + properties: + chart: redis-cluster + version: 6.2.7 + url: https://charts.bitnami.com/bitnami + repoType: helm +``` + +## From OSS bucket + +| Parameters | Description | Example | +| --------------- | -------- | ------------------------------------------------------------ | --------------------------- | +| repoType | required, indicates where it's from | oss | +| pullInterval | optional, synchronize with bucket, tunning interval and 5 minutes by default | 10m | +| url | required, bucket's endpoint and no need to fill in with scheme | oss-cn-beijing.aliyuncs.com | +| secretRef | optional, Save the name of a Secret, which is the credential to read the bucket. Secret contains accesskey and secretkey fields| sec-name | +| timeout | optional, The timeout period of the download operation, the default is 20s | 60s | +| chart | required, Chart storage path (key) | ./chart/podinfo-5.1.3.tgz | +| version | optional, In OSS source, this parameter has no effect | | +| targetNamespace | optional, The namespace of the installed chart, which is determined by the chart itself by default | your-ns | +| releaseName | optional, Installed release name | your-rn | +| values | optional, Overwrite the Values.yaml of the chart for Helm rendering. | | +| oss.bucketName | required, bucket name | your-bucket | +| oss.provider | optional, Optional generic or aws, fill in aws if the certificate is obtained from aws EC2. The default is generic.| generic | +| oss.region | optional, bucket region | | + +**How-to** + +1. (Opentional) If your OSS bucket needs identity verification, create a Secret: + +```shell +$ kubectl create secret generic bucket-secret --from-literal=accesskey= --from-literal=secretkey= +secret/bucket-secret created +``` + +1. Example +```yaml +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: bucket-app +spec: + components: + - name: bucket-comp + type: helm + properties: + repoType: oss + # required if bucket is private + secretRef: bucket-secret + chart: ./chart/podinfo-5.1.3.tgz + url: oss-cn-beijing.aliyuncs.com + oss: + bucketName: definition-registry +``` + +## From Git Repo + +| Parameters | Description | Example | +| --------------- | -------- | ------------------------------------------------------------ | ----------------------------------------------- | +| repoType | required, indicates where it's from | git | +| pullInterval | optional, synchronize with Git Repo, tunning interval and 5 minutes by default | 10m | +| url | required, Git Repo address | https://github.com/oam-dev/terraform-controller | +| secretRef | optional, The name of the Secret object that holds the credentials required to pull the Git repository. For HTTP/S basic authentication, the Secret must contain the username and password fields. For SSH authentication, the identity, identity.pub and known_hosts fields must be included | sec-name | +| timeout | optional, The timeout period of the download operation, the default is 20s | 60s | +| chart | required, Chart storage path (key) | ./chart/podinfo-5.1.3.tgz | +| version | optional, In Git source, this parameter has no effect | | +| targetNamespace | optional, the namespace to install chart, decided by chart itself | your-ns | +| releaseName | optional, Installed release name | your-rn | +| values | optional, Overwrite the Values.yaml of the chart for Helm rendering. | | +| git.branch | optional, Git branch, master by default | dev | + +**How-to** + +```yaml +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: app-delivering-chart +spec: + components: + - name: terraform-controller + type: helm + properties: + repoType: git + url: https://github.com/oam-dev/terraform-controller + chart: ./chart + git: + branch: master +``` \ No newline at end of file diff --git a/docs/platform-engineers/components/built-in/kustomize.md b/docs/platform-engineers/components/built-in/kustomize.md new file mode 100644 index 00000000..8a6f3aec --- /dev/null +++ b/docs/platform-engineers/components/built-in/kustomize.md @@ -0,0 +1,98 @@ +--- +title: Kustomize +--- + +Create a Kustomize Component, it could be from Git Repo or OSS bucket. + +### From OSS bucket + +| Parameters | Description | Example | +| -------------- | ------------------------------------------------------------ | --------------------------- | +| repoType | required, The value of the Git. To indicate that kustomize configuration comes from the Git repository | oss | +| pullInterval | optional, Synchronize with Git repository, and the time interval between tuning helm release. The default value is 5m (5 minutes) | 10m | +| url | required, bucket's endpoint, no need to fill in with scheme | oss-cn-beijing.aliyuncs.com | +| secretRef | optional, Save the name of a Secret, which is the credential to read the bucket. Secret contains accesskey and secretkey fields | sec-name | +| timeout | optional, The timeout period of the download operation, the default is 20s | 60s | +| path | required, The directory containing the kustomization.yaml file, or the directory containing a set of YAML files (used to generate kustomization.yaml) | ./prod | +| oss.bucketName | required, bucket name | your-bucket | +| oss.provider | optional, Generic or aws, if you get the certificate from aws EC2, fill in aws. The default is generic. | generic | +| oss.region | optional, bucket region | | + +**How-to** + +1. (Opentional) If your OSS bucket needs identity verification, create a Secret: + +```shell +$ kubectl create secret generic bucket-secret --from-literal=accesskey= --from-literal=secretkey= +secret/bucket-secret created +``` + +2. Example +```yaml +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: bucket-app +spec: + components: + - name: bucket-comp + type: kustomize + properties: + repoType: oss + # required if bucket is private + secretRef: bucket-secret + url: oss-cn-beijing.aliyuncs.com + oss: + bucketName: definition-registry + path: ./app/prod/ + +``` + +### From Git Repo + + +| Parameters | Description | Example | +| --------------- | ------------------------------------------------------------ | ----------------------------------------------- | +| repoType | required, The value of the Git. To indicate that kustomize configuration comes from the Git repository | git | +| pullInterval | optional, Synchronize with Git repository, and the time interval between tuning helm release. The default value is 5m (5 minutes) | 10m | +| url | required, Git repository address | https://github.com/oam-dev/terraform-controller | +| secretRef | optional, The Secret object name that holds the credentials required to pull the Git repository. The username and password fields must be included in the HTTP/S basic authentication Secret. For SSH authentication, the identity, identity.pub and known_hosts fields must be included | sec-name | +| timeout | optional, The timeout period of the download operation, the default is 20s | 60s | +| git.branch | optional, Git branch, master by default | dev | + +**How-to** + +```yaml +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: git-app +spec: + components: + - name: git-comp + type: kustomize + properties: + repoType: git + url: https://github.com/// + git: + branch: master + path: ./app/dev/ +``` + +## Override Kustomize + +```yaml +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: bucket-app +spec: + components: + - name: bucket-comp + type: kustomize + properties: + # ...omitted for brevity + path: ./app/ + +``` + diff --git a/docs/platform-engineers/components/built-in/more.md b/docs/platform-engineers/components/built-in/more.md new file mode 100644 index 00000000..7c3773b4 --- /dev/null +++ b/docs/platform-engineers/components/built-in/more.md @@ -0,0 +1,34 @@ +--- +title: Want More? +--- + +## 1. Get from capability registry + +You can get more from official capability registry by using KubeVela [plugin](../../../developers/references/kubectl-plugin#install-kubectl-vela-plugin)。 + +### List + +By default, the commands will list capabilities from [repo](https://registry.kubevela.net) maintained by KubeVela. + +```shell +$ kubectl vela comp --discover +Showing components from registry: oss://registry.kubevela.net +NAME REGISTRY DEFINITION +webserver default deployments.apps +``` + +### Install + +Then you can install a component like: + +```shell +$ kubectl vela comp get webserver +Installing component capability webserver +Successfully install component: webserver +``` + +## 2. Designed by yourself + +* Read [how to edit definitions](../../cue/definition-edit) to build your own capability from existing ones. +* [Build your own capability from scratch](../../cue/advanced) + and learn more features about how to [define custom components](../custom-component). \ No newline at end of file diff --git a/docs/platform-engineers/components/built-in/overview.md b/docs/platform-engineers/components/built-in/overview.md new file mode 100644 index 00000000..bf022379 --- /dev/null +++ b/docs/platform-engineers/components/built-in/overview.md @@ -0,0 +1,25 @@ +--- +title: Overview +--- + +``` +$ vela components +NAME NAMESPACE WORKLOAD DESCRIPTION +alibaba-ack vela-system configurations.terraform.core.oam.dev Terraform configuration for Alibaba Cloud ACK cluster +alibaba-oss vela-system configurations.terraform.core.oam.dev Terraform configuration for Alibaba Cloud OSS object +alibaba-rds vela-system configurations.terraform.core.oam.dev Terraform configuration for Alibaba Cloud RDS object +helm vela-system autodetects.core.oam.dev helm release is a group of K8s resources from either git + repository or helm repo +kustomize vela-system autodetects.core.oam.dev kustomize can fetching, building, updating and applying + Kustomize manifests from git repo. +my-stateful vela-system statefulsets.apps My StatefulSet component. +raw vela-system autodetects.core.oam.dev raw allow users to specify raw K8s object in properties +task vela-system jobs.batch Describes jobs that run code or a script to completion. +webservice vela-system deployments.apps Describes long-running, scalable, containerized services + that have a stable network endpoint to receive external + network traffic from customers. +wei-stateful vela-system statefulsets.apps My StatefulSet component. +worker vela-system deployments.apps Describes long-running, scalable, containerized services + that running at backend. They do NOT have network endpoint + to receive external network traffic. +``` \ No newline at end of file diff --git a/docs/platform-engineers/components/built-in/raw.md b/docs/platform-engineers/components/built-in/raw.md new file mode 100644 index 00000000..8dab1ca5 --- /dev/null +++ b/docs/platform-engineers/components/built-in/raw.md @@ -0,0 +1,32 @@ +--- +title: Raw +--- + +Use raw Kubernetes resources directly. For example, a Job. + +## How to use + +```yaml +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: app-raw +spec: + components: + - name: myjob + type: raw + properties: + apiVersion: batch/v1 + kind: Job + metadata: + name: pi + spec: + template: + spec: + containers: + - name: pi + image: perl + command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"] + restartPolicy: Never + backoffLimit: 4 +``` \ No newline at end of file diff --git a/docs/platform-engineers/components/built-in/task.md b/docs/platform-engineers/components/built-in/task.md new file mode 100644 index 00000000..650d4297 --- /dev/null +++ b/docs/platform-engineers/components/built-in/task.md @@ -0,0 +1,197 @@ +--- +title: Task +--- + +Describes jobs that run code or a script to completion. + +## How-to + +```yaml +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: app-worker +spec: + components: + - name: mytask + type: task + properties: + image: perl + count: 10 + cmd: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"] +``` + +## Description + +```console +# Properties ++----------------+--------------------------------------------------------------------------------------------------+-----------------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++----------------+--------------------------------------------------------------------------------------------------+-----------------------------------+----------+---------+ +| cmd | Commands to run in the container | []string | false | | +| env | Define arguments by using environment variables | [[]env](#env) | false | | +| count | Specify number of tasks to run in parallel | int | true | 1 | +| restart | Define the job restart policy, the value can only be Never or OnFailure. By default, it's Never. | string | true | Never | +| image | Which image would you like to use for your service | string | true | | +| cpu | Number of CPU units for the service, like `0.5` (0.5 CPU core), `1` (1 CPU core) | string | false | | +| memory | Specifies the attributes of the memory resource required for the container. | string | false | | +| volumes | Declare volumes and volumeMounts | [[]volumes](#volumes) | false | | +| livenessProbe | Instructions for assessing whether the container is alive. | [livenessProbe](#livenessProbe) | false | | +| readinessProbe | Instructions for assessing whether the container is in a suitable state to serve traffic. | [readinessProbe](#readinessProbe) | false | | ++----------------+--------------------------------------------------------------------------------------------------+-----------------------------------+----------+---------+ + + +########### readinessProbe ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ +| exec | Instructions for assessing container health by executing a command. Either this attribute or the | [exec](#exec) | false | | +| | httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive | | | | +| | with both the httpGet attribute and the tcpSocket attribute. | | | | +| httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute | [httpGet](#httpGet) | false | | +| | 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. | | | | +| tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the | [tcpSocket](#tcpSocket) | false | | +| | exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with | | | | +| | both the exec attribute and the httpGet attribute. | | | | +| 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 | int | true | 3 | +| | not ready (readiness probe). | | | | ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ + + +############### tcpSocket ++------+---------------------------------------------------------------------------------------+------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++------+---------------------------------------------------------------------------------------+------+----------+---------+ +| port | The TCP socket within the container that should be probed to assess container health. | int | true | | ++------+---------------------------------------------------------------------------------------+------+----------+---------+ + + +############# httpGet ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ +| path | The endpoint, relative to the port, to which the HTTP GET request should be directed. | string | true | | +| port | The TCP socket within the container to which the HTTP GET request should be directed. | int | true | | +| httpHeaders | | [[]httpHeaders](#httpHeaders) | false | | ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ + + +############## httpHeaders ++-------+-------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-------+-------------+--------+----------+---------+ +| name | | string | true | | +| value | | string | true | | ++-------+-------------+--------+----------+---------+ + + +############ exec ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ +| command | A command to be executed inside the container to assess its health. Each space delimited token of | []string | true | | +| | the command is a separate array element. Commands exiting 0 are considered to be successful probes, | | | | +| | whilst all other exit codes are considered failures. | | | | ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ + + +###### livenessProbe ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ +| exec | Instructions for assessing container health by executing a command. Either this attribute or the | [exec](#exec) | false | | +| | httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive | | | | +| | with both the httpGet attribute and the tcpSocket attribute. | | | | +| httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute | [httpGet](#httpGet) | false | | +| | 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. | | | | +| tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the | [tcpSocket](#tcpSocket) | false | | +| | exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with | | | | +| | both the exec attribute and the httpGet attribute. | | | | +| 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 | int | true | 3 | +| | not ready (readiness probe). | | | | ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ + + +########## tcpSocket ++------+---------------------------------------------------------------------------------------+------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++------+---------------------------------------------------------------------------------------+------+----------+---------+ +| port | The TCP socket within the container that should be probed to assess container health. | int | true | | ++------+---------------------------------------------------------------------------------------+------+----------+---------+ + + +######## httpGet ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ +| path | The endpoint, relative to the port, to which the HTTP GET request should be directed. | string | true | | +| port | The TCP socket within the container to which the HTTP GET request should be directed. | int | true | | +| httpHeaders | | [[]httpHeaders](#httpHeaders) | false | | ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ + + +######### httpHeaders ++-------+-------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-------+-------------+--------+----------+---------+ +| name | | string | true | | +| value | | string | true | | ++-------+-------------+--------+----------+---------+ + + +####### exec ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ +| command | A command to be executed inside the container to assess its health. Each space delimited token of | []string | true | | +| | the command is a separate array element. Commands exiting 0 are considered to be successful probes, | | | | +| | whilst all other exit codes are considered failures. | | | | ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ + + +##### volumes ++-----------+---------------------------------------------------------------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-----------+---------------------------------------------------------------------+--------+----------+---------+ +| name | | string | true | | +| mountPath | | string | true | | +| type | Specify volume type, options: "pvc","configMap","secret","emptyDir" | string | true | | ++-----------+---------------------------------------------------------------------+--------+----------+---------+ + + +## env ++-----------+-----------------------------------------------------------+-------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-----------+-----------------------------------------------------------+-------------------------+----------+---------+ +| name | Environment variable name | string | true | | +| value | The value of the environment variable | string | false | | +| valueFrom | Specifies a source the value of this var should come from | [valueFrom](#valueFrom) | false | | ++-----------+-----------------------------------------------------------+-------------------------+----------+---------+ + + +### valueFrom ++--------------+--------------------------------------------------+-------------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++--------------+--------------------------------------------------+-------------------------------+----------+---------+ +| secretKeyRef | Selects a key of a secret in the pod's namespace | [secretKeyRef](#secretKeyRef) | true | | ++--------------+--------------------------------------------------+-------------------------------+----------+---------+ + + +#### secretKeyRef ++------+------------------------------------------------------------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++------+------------------------------------------------------------------+--------+----------+---------+ +| name | The name of the secret in the pod's namespace to select from | string | true | | +| key | The key of the secret to select from. Must be a valid secret key | string | true | | ++------+------------------------------------------------------------------+--------+----------+---------+ +``` \ No newline at end of file diff --git a/docs/platform-engineers/components/built-in/webservice.md b/docs/platform-engineers/components/built-in/webservice.md new file mode 100644 index 00000000..b551fcbe --- /dev/null +++ b/docs/platform-engineers/components/built-in/webservice.md @@ -0,0 +1,208 @@ +--- +title: Web Service +--- + +Describes long-running, scalable, containerized services that have a stable network endpoint to receive external network traffic from customers. + +## How-to + +```YAML +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: website +spec: + components: + - name: frontend + type: webservice + properties: + image: oamdev/testapp:v1 + cmd: ["node", "server.js"] + port: 8080 + cpu: "0.1" + env: + - name: FOO + value: bar + - name: FOO + valueFrom: + secretKeyRef: + name: bar + key: bar +``` + +## Description + +```console +$ vela show webservice +# Properties ++------------------+-------------------------------------------------------------------------------------------+-----------------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++------------------+-------------------------------------------------------------------------------------------+-----------------------------------+----------+---------+ +| cmd | Commands to run in the container | []string | false | | +| env | Define arguments by using environment variables | [[]env](#env) | false | | +| image | Which image would you like to use for your service | string | true | | +| port | Which port do you want customer traffic sent to | int | true | 80 | +| 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 | | +| memory | Specifies the attributes of the memory resource required for the container. | string | false | | +| volumes | Declare volumes and volumeMounts | [[]volumes](#volumes) | false | | +| livenessProbe | Instructions for assessing whether the container is alive. | [livenessProbe](#livenessProbe) | false | | +| readinessProbe | Instructions for assessing whether the container is in a suitable state to serve traffic. | [readinessProbe](#readinessProbe) | false | | +| imagePullSecrets | Specify image pull secrets for your service | []string | false | | ++------------------+-------------------------------------------------------------------------------------------+-----------------------------------+----------+---------+ + + +########### readinessProbe ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ +| exec | Instructions for assessing container health by executing a command. Either this attribute or the | [exec](#exec) | false | | +| | httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive | | | | +| | with both the httpGet attribute and the tcpSocket attribute. | | | | +| httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute | [httpGet](#httpGet) | false | | +| | 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. | | | | +| tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the | [tcpSocket](#tcpSocket) | false | | +| | exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with | | | | +| | both the exec attribute and the httpGet attribute. | | | | +| 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 | int | true | 3 | +| | not ready (readiness probe). | | | | ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ + + +############### tcpSocket ++------+---------------------------------------------------------------------------------------+------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++------+---------------------------------------------------------------------------------------+------+----------+---------+ +| port | The TCP socket within the container that should be probed to assess container health. | int | true | | ++------+---------------------------------------------------------------------------------------+------+----------+---------+ + + +############# httpGet ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ +| path | The endpoint, relative to the port, to which the HTTP GET request should be directed. | string | true | | +| port | The TCP socket within the container to which the HTTP GET request should be directed. | int | true | | +| httpHeaders | | [[]httpHeaders](#httpHeaders) | false | | ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ + + +############## httpHeaders ++-------+-------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-------+-------------+--------+----------+---------+ +| name | | string | true | | +| value | | string | true | | ++-------+-------------+--------+----------+---------+ + + +############ exec ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ +| command | A command to be executed inside the container to assess its health. Each space delimited token of | []string | true | | +| | the command is a separate array element. Commands exiting 0 are considered to be successful probes, | | | | +| | whilst all other exit codes are considered failures. | | | | ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ + + +###### livenessProbe ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ +| exec | Instructions for assessing container health by executing a command. Either this attribute or the | [exec](#exec) | false | | +| | httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive | | | | +| | with both the httpGet attribute and the tcpSocket attribute. | | | | +| httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute | [httpGet](#httpGet) | false | | +| | 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. | | | | +| tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the | [tcpSocket](#tcpSocket) | false | | +| | exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with | | | | +| | both the exec attribute and the httpGet attribute. | | | | +| 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 | int | true | 3 | +| | not ready (readiness probe). | | | | ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ + + +########## tcpSocket ++------+---------------------------------------------------------------------------------------+------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++------+---------------------------------------------------------------------------------------+------+----------+---------+ +| port | The TCP socket within the container that should be probed to assess container health. | int | true | | ++------+---------------------------------------------------------------------------------------+------+----------+---------+ + + +######## httpGet ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ +| path | The endpoint, relative to the port, to which the HTTP GET request should be directed. | string | true | | +| port | The TCP socket within the container to which the HTTP GET request should be directed. | int | true | | +| httpHeaders | | [[]httpHeaders](#httpHeaders) | false | | ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ + + +######### httpHeaders ++-------+-------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-------+-------------+--------+----------+---------+ +| name | | string | true | | +| value | | string | true | | ++-------+-------------+--------+----------+---------+ + + +####### exec ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ +| command | A command to be executed inside the container to assess its health. Each space delimited token of | []string | true | | +| | the command is a separate array element. Commands exiting 0 are considered to be successful probes, | | | | +| | whilst all other exit codes are considered failures. | | | | ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ + + +##### volumes ++-----------+---------------------------------------------------------------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-----------+---------------------------------------------------------------------+--------+----------+---------+ +| name | | string | true | | +| mountPath | | string | true | | +| type | Specify volume type, options: "pvc","configMap","secret","emptyDir" | string | true | | ++-----------+---------------------------------------------------------------------+--------+----------+---------+ + + +## env ++-----------+-----------------------------------------------------------+-------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-----------+-----------------------------------------------------------+-------------------------+----------+---------+ +| name | Environment variable name | string | true | | +| value | The value of the environment variable | string | false | | +| valueFrom | Specifies a source the value of this var should come from | [valueFrom](#valueFrom) | false | | ++-----------+-----------------------------------------------------------+-------------------------+----------+---------+ + + +### valueFrom ++--------------+--------------------------------------------------+-------------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++--------------+--------------------------------------------------+-------------------------------+----------+---------+ +| secretKeyRef | Selects a key of a secret in the pod's namespace | [secretKeyRef](#secretKeyRef) | true | | ++--------------+--------------------------------------------------+-------------------------------+----------+---------+ + + +#### secretKeyRef ++------+------------------------------------------------------------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++------+------------------------------------------------------------------+--------+----------+---------+ +| name | The name of the secret in the pod's namespace to select from | string | true | | +| key | The key of the secret to select from. Must be a valid secret key | string | true | | ++------+------------------------------------------------------------------+--------+----------+---------+ +``` \ No newline at end of file diff --git a/docs/platform-engineers/components/built-in/worker.md b/docs/platform-engineers/components/built-in/worker.md new file mode 100644 index 00000000..9f458308 --- /dev/null +++ b/docs/platform-engineers/components/built-in/worker.md @@ -0,0 +1,199 @@ +--- +title: Worker +--- + +Describes long-running, scalable, containerized services that running at backend. They do NOT have network endpoint to receive external network traffic. + +## How-to + +```yaml +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: app-worker +spec: + components: + - name: myworker + type: worker + properties: + image: "busybox" + cmd: + - sleep + - "1000" +``` + +## Description + +```console +$ vela show worker +# Properties ++------------------+-------------------------------------------------------------------------------------------+-----------------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++------------------+-------------------------------------------------------------------------------------------+-----------------------------------+----------+---------+ +| cmd | Commands to run in the container | []string | false | | +| env | Define arguments by using environment variables | [[]env](#env) | false | | +| 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 | | +| memory | Specifies the attributes of the memory resource required for the container. | string | false | | +| volumes | Declare volumes and volumeMounts | [[]volumes](#volumes) | false | | +| livenessProbe | Instructions for assessing whether the container is alive. | [livenessProbe](#livenessProbe) | false | | +| readinessProbe | Instructions for assessing whether the container is in a suitable state to serve traffic. | [readinessProbe](#readinessProbe) | false | | +| imagePullSecrets | Specify image pull secrets for your service | []string | false | | ++------------------+-------------------------------------------------------------------------------------------+-----------------------------------+----------+---------+ + + +########### readinessProbe ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ +| exec | Instructions for assessing container health by executing a command. Either this attribute or the | [exec](#exec) | false | | +| | httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive | | | | +| | with both the httpGet attribute and the tcpSocket attribute. | | | | +| httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute | [httpGet](#httpGet) | false | | +| | 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. | | | | +| tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the | [tcpSocket](#tcpSocket) | false | | +| | exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with | | | | +| | both the exec attribute and the httpGet attribute. | | | | +| 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 | int | true | 3 | +| | not ready (readiness probe). | | | | ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ + + +############### tcpSocket ++------+---------------------------------------------------------------------------------------+------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++------+---------------------------------------------------------------------------------------+------+----------+---------+ +| port | The TCP socket within the container that should be probed to assess container health. | int | true | | ++------+---------------------------------------------------------------------------------------+------+----------+---------+ + + +############# httpGet ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ +| path | The endpoint, relative to the port, to which the HTTP GET request should be directed. | string | true | | +| port | The TCP socket within the container to which the HTTP GET request should be directed. | int | true | | +| httpHeaders | | [[]httpHeaders](#httpHeaders) | false | | ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ + + +############## httpHeaders ++-------+-------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-------+-------------+--------+----------+---------+ +| name | | string | true | | +| value | | string | true | | ++-------+-------------+--------+----------+---------+ + + +############ exec ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ +| command | A command to be executed inside the container to assess its health. Each space delimited token of | []string | true | | +| | the command is a separate array element. Commands exiting 0 are considered to be successful probes, | | | | +| | whilst all other exit codes are considered failures. | | | | ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ + + +###### livenessProbe ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ +| exec | Instructions for assessing container health by executing a command. Either this attribute or the | [exec](#exec) | false | | +| | httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive | | | | +| | with both the httpGet attribute and the tcpSocket attribute. | | | | +| httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute | [httpGet](#httpGet) | false | | +| | 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. | | | | +| tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the | [tcpSocket](#tcpSocket) | false | | +| | exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with | | | | +| | both the exec attribute and the httpGet attribute. | | | | +| 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 | int | true | 3 | +| | not ready (readiness probe). | | | | ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ + + +########## tcpSocket ++------+---------------------------------------------------------------------------------------+------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++------+---------------------------------------------------------------------------------------+------+----------+---------+ +| port | The TCP socket within the container that should be probed to assess container health. | int | true | | ++------+---------------------------------------------------------------------------------------+------+----------+---------+ + + +######## httpGet ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ +| path | The endpoint, relative to the port, to which the HTTP GET request should be directed. | string | true | | +| port | The TCP socket within the container to which the HTTP GET request should be directed. | int | true | | +| httpHeaders | | [[]httpHeaders](#httpHeaders) | false | | ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ + + +######### httpHeaders ++-------+-------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-------+-------------+--------+----------+---------+ +| name | | string | true | | +| value | | string | true | | ++-------+-------------+--------+----------+---------+ + + +####### exec ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ +| command | A command to be executed inside the container to assess its health. Each space delimited token of | []string | true | | +| | the command is a separate array element. Commands exiting 0 are considered to be successful probes, | | | | +| | whilst all other exit codes are considered failures. | | | | ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ + + +##### volumes ++-----------+---------------------------------------------------------------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-----------+---------------------------------------------------------------------+--------+----------+---------+ +| name | | string | true | | +| mountPath | | string | true | | +| type | Specify volume type, options: "pvc","configMap","secret","emptyDir" | string | true | | ++-----------+---------------------------------------------------------------------+--------+----------+---------+ + + +## env ++-----------+-----------------------------------------------------------+-------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-----------+-----------------------------------------------------------+-------------------------+----------+---------+ +| name | Environment variable name | string | true | | +| value | The value of the environment variable | string | false | | +| valueFrom | Specifies a source the value of this var should come from | [valueFrom](#valueFrom) | false | | ++-----------+-----------------------------------------------------------+-------------------------+----------+---------+ + + +### valueFrom ++--------------+--------------------------------------------------+-------------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++--------------+--------------------------------------------------+-------------------------------+----------+---------+ +| secretKeyRef | Selects a key of a secret in the pod's namespace | [secretKeyRef](#secretKeyRef) | true | | ++--------------+--------------------------------------------------+-------------------------------+----------+---------+ + + +#### secretKeyRef ++------+------------------------------------------------------------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++------+------------------------------------------------------------------+--------+----------+---------+ +| name | The name of the secret in the pod's namespace to select from | string | true | | +| key | The key of the secret to select from. Must be a valid secret key | string | true | | ++------+------------------------------------------------------------------+--------+----------+---------+ +``` \ No newline at end of file diff --git a/docs/platform-engineers/traits/built-in/overview.md b/docs/platform-engineers/traits/built-in/overview.md index 229be310..3b75fa12 100644 --- a/docs/platform-engineers/traits/built-in/overview.md +++ b/docs/platform-engineers/traits/built-in/overview.md @@ -1,5 +1,5 @@ --- -title: Builtin Traits +title: OverView --- ``` diff --git a/i18n/zh/docusaurus-plugin-content-docs/current.json b/i18n/zh/docusaurus-plugin-content-docs/current.json index 2cd80bdb..69ca51c0 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current.json +++ b/i18n/zh/docusaurus-plugin-content-docs/current.json @@ -162,5 +162,9 @@ "sidebar.docs.category.Builtin Traits": { "message": "内置运维特征", "description": "The built in trait" + }, + "sidebar.docs.category.Builtin Components": { + "message": "内置组件", + "description": "The built in component" } } \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/end-user/binding-traits.md b/i18n/zh/docusaurus-plugin-content-docs/current/end-user/binding-traits.md index 8bcf3cec..62a7f0ac 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/end-user/binding-traits.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/end-user/binding-traits.md @@ -103,7 +103,7 @@ ingerss-app express-server webservice ingress running healthy 2 如果 status 显示为 rendering,则表示仍在渲染中,或者 HEALTHY 一直 false,则你需要使用 `kubectl get application ingress-app -o yaml` 查看报错信息进行对应的处理。 -接下来,让我们查看网关提供的公网 IP: +查看返回的信息: ```shell @@ -130,8 +130,30 @@ status: status: running ``` +最后通过 vela port-forward ingress-app 转发到本地处理请求: +```shell +vela port-forward ingress-app +Forwarding from 127.0.0.1:8000 -> 8000 +Forwarding from [::1]:8000 -> 8000 -// 后续文案,需要在 [https://github.com/oam-dev/kubevela/issues/2188](https://github.com/oam-dev/kubevela/issues/2188) resolve 之后解决 +Forward successfully! Opening browser ... +Handling connection for 8000 +``` +访问服务: +```shell +curl -H "Host:testsvc.example.com" http://127.0.0.1:8000/ +Hello World + + + ## . + ## ## ## == + ## ## ## ## ## === + /""""""""""""""""\___/ === + ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~ + \______ o _,/ + \ \ _,' + `'--.._\..--'' +``` ## 给组件添加标签和注释 @@ -280,9 +302,9 @@ kubectl logs -f log-gen-worker-7bb65dcdd6-tpbdh count-log ## 自定义运维特征 +当已经内置的运维特征无法满足需求,你可以自由的自定义运维能力,请查看管理员手册里的[自定义运维特征](../platform-engineers/traits/customize-trait)进行实现。 ## 下一步 -- 扩缩容 -- 云资源绑定 -- 灰度发布 +- [集成云资源](./cloud-services),了解如何集成各类云厂商的云资源 +- [灰度发布和扩缩容](./rollout-scaler) \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/end-user/canary-blue-green.md b/i18n/zh/docusaurus-plugin-content-docs/current/end-user/canary-blue-green.md new file mode 100644 index 00000000..14b7c71b --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/end-user/canary-blue-green.md @@ -0,0 +1,5 @@ +--- +title: 金丝雀发布、蓝绿发布、多泳道发布 +--- + +WIP diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/end-user/cloud-services.md b/i18n/zh/docusaurus-plugin-content-docs/current/end-user/cloud-services.md index 0ea5cf46..8d05b41b 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/end-user/cloud-services.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/end-user/cloud-services.md @@ -2,4 +2,130 @@ title: 集成云资源 --- -WIP \ No newline at end of file +在面向云开发逐渐成为范式的这个时代,我们希望集成来源不同、类型不同云资源的需求非常迫切。不管是最基本的对象存储、云数据库,还是更多的负载均衡等等,也面临着混合云、多云等复杂环境所带来的挑战,而 KubeVela 都可以很好满足你的需要。 + +KubeVela 通过云资源组件(Component)和运维特征(Trait)里的资源绑定功能,高效安全地完成不同类型云资源的集成工作。目前你可以直接调用阿里云容器服务 Kubernetes 版(ACK )、阿里云对象存储服务(OSS)和阿里云关系型数据库服务(RDS)这些默认组件。同时在未来,更多新的云资源也会在社区的支撑下逐渐成为默认选项,让你标准化统一地去使用各种厂商的云资源。 + +## 查看 KubeVela 的云资源组件 + +我们通过 [KubeVela CLI](../getting-started/quick-install.mdx#3-安装-kubevela-cli)来查看,当前系统中可用的云资源组件类型: + +```shell +$ vela components +NAME NAMESPACE WORKLOAD DESCRIPTION +alibaba-ack vela-system configurations.terraform.core.oam.dev Terraform configuration for Alibaba Cloud ACK cluster +alibaba-oss vela-system configurations.terraform.core.oam.dev Terraform configuration for Alibaba Cloud OSS object +alibaba-rds vela-system configurations.terraform.core.oam.dev Terraform configuration for Alibaba Cloud RDS object +``` + +KubeVela 对云资源的集成流程大致如下: + + - 熟悉各云服务商的鉴权机制,获取并准备需要的 secret 或者 token 等密钥 + - 将鉴权信息保存到 Terrform 的全局配置中,下一步校验 + - KubeVela 通过 Terraform 控制器完成鉴权校验,通过后自动拉起对应云资源 + +## 激活云资源权限 + +首先准备好,要访问对应云厂商的密钥信息后,使用 `vela addon enable` 指令来全局配置鉴权信息: +```shell +vela addon enable terraform/provider-alicloud --ALICLOUD_ACCESS_KEY_ID=<你的秘钥 Key ID> -ALICLOUD_SECRET_ACCESS_KEY=<你的秘钥密码> +``` + +下面我们以阿里云关系型数据库(RDS)的例子,作为示例进行讲解。 + +### 部署云资源 +接下来,请直接复制一个编写好的应用部署计划,在命令行中执行: + +```shell +cat < --from-literal=secretkey= +secret/bucket-secret created +``` + +2. 部署 chart +```yaml +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: bucket-app +spec: + components: + - name: bucket-comp + type: helm + properties: + repoType: oss + # required if bucket is private + secretRef: bucket-secret + chart: ./chart/podinfo-5.1.3.tgz + url: oss-cn-beijing.aliyuncs.com + oss: + bucketName: definition-registry +``` + +上面的示例中,Application 中名为 bucket-comp 的组件交付了一个来自 endpoint 为 oss-cn-beijing.aliyuncs.com 的 OSS bucket definition-registry 的 chart。chart 路径为 ./chart/podinfo-5.1.3.tgz。 + +## 部署来自 Git 仓库的 Chart + +| 参数 | 是否可选 | 含义 | 例子 | +| --------------- | -------- | ------------------------------------------------------------ | ----------------------------------------------- | +| repoType | 必填 | 值为 git 标志 chart 来自 Git 仓库 | git | +| pullInterval | 可选 | 与 Git 仓库进行同步,与调谐 Helm release 的时间间隔 默认值5m(5分钟) | 10m | +| url | 必填 | Git 仓库地址 | https://github.com/oam-dev/terraform-controller | +| secretRef | 可选 | 存有拉取 Git 仓库所需凭证的 Secret 对象名,对 HTTP/S 基本鉴权 Secret 中必须包含 username 和 password 字段。对 SSH 形式鉴权必须包含 identity, identity.pub 和 known_hosts 字段 | sec-name | +| timeout | 可选 | 下载操作的超时时间,默认 20s | 60s | +| chart | 必填 | chart 存放路径(key) | ./chart/podinfo-5.1.3.tgz | +| version | 可选 | 在 Git 来源中,该参数不起作用 | | +| targetNamespace | 可选 | 安装 chart 的名字空间,默认由 chart 本身决定 | your-ns | +| releaseName | 可选 | 安装得到的 release 名称 | your-rn | +| values | 可选 | 覆写 chart 的 Values.yaml ,用于 Helm 渲染。 | 见来自 Git 仓库的例子 | +| git.branch | 可选 | Git 分支,默认为 master | dev | + +**使用示例** + +```yaml +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: app-delivering-chart +spec: + components: + - name: terraform-controller + type: helm + properties: + repoType: git + url: https://github.com/oam-dev/terraform-controller + chart: ./chart + git: + branch: master +``` + +上面的示例中,Application 中名为 terraform-controller 的组件交付了一个来自 https://github.com/oam-dev/terraform-controller 的 Github 仓库的 chart。chart 路径为 ./chart,仓库分支为 master。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/components/built-in/kustomize.md b/i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/components/built-in/kustomize.md new file mode 100644 index 00000000..b6abf999 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/components/built-in/kustomize.md @@ -0,0 +1,99 @@ +--- +title: Kustomize +--- + +引入一个 kustomize 对象作为组件,可以来自 Git 仓库、OSS bucket。 + +### 来自 OSS bucket + +| 参数 | 是否可选 | 含义 | 例子 | +| -------------- | -------- | ------------------------------------------------------------ | --------------------------- | +| repoType | 必填 | 值为 oss 标志 kustomize 配置来自 OSS bucket | oss | +| pullInterval | 可选 | 与 bucket 进行同步,与调谐 kustomize 的时间间隔 默认值5m(5分钟) | 10m | +| url | 必填 | bucket 的 endpoint,无需填写 scheme | oss-cn-beijing.aliyuncs.com | +| secretRef | 可选 | 保存一个 Secret 的名字,该Secret是读取 bucket 的凭证。Secret 包含 accesskey 和 secretkey 字段 | sec-name | +| timeout | 可选 | 下载操作的超时时间,默认 20s | 60s | +| path | 必填 | 包含 kustomization.yaml 文件的目录, 或者包含一组 YAML 文件(用以生成 kustomization.yaml )的目录。 | ./prod | +| oss.bucketName | 必填 | bucket 名称 | your-bucket | +| oss.provider | 可选 | 可选 generic 或 aws,若从 aws EC2 获取凭证则填 aws。默认 generic。 | generic | +| oss.region | 可选 | bucket 地区 | | + +**使用示例** + +1. (可选)如果你的 OSS bucket 需要身份验证, 创建 Secret 对象: + +```shell +$ kubectl create secret generic bucket-secret --from-literal=accesskey= --from-literal=secretkey= +secret/bucket-secret created +``` + +2. 部署 chart +```yaml +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: bucket-app +spec: + components: + - name: bucket-comp + type: kustomize + properties: + repoType: oss + # required if bucket is private + secretRef: bucket-secret + url: oss-cn-beijing.aliyuncs.com + oss: + bucketName: definition-registry + path: ./app/prod/ + +``` + + +### 来自 Git 仓库 + + +| 参数 | 是否可选 | 含义 | 例子 | +| --------------- | -------- | ------------------------------------------------------------ | ----------------------------------------------- | +| repoType | 必填 | 值为 git 标志 kustomize 配置来自 Git 仓库 | git | +| pullInterval | 可选 | 与 Git 仓库进行同步,与调谐 helm release 的时间间隔 默认值5m(5分钟) | 10m | +| url | 必填 | Git 仓库地址 | https://github.com/oam-dev/terraform-controller | +| secretRef | 可选 | 存有拉取 Git 仓库所需凭证的 Secret 对象名,对 HTTP/S 基本鉴权 Secret 中必须包含 username 和 password 字段。对 SSH 形式鉴权必须包含 identity, identity.pub 和 known_hosts 字段 | sec-name | +| timeout | 可选 | 下载操作的超时时间,默认 20s | 60s | +| git.branch | 可选 | Git 分支,默认为 master | dev | + +**使用示例** + +```yaml +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: git-app +spec: + components: + - name: git-comp + type: kustomize + properties: + repoType: git + url: https://github.com/// + git: + branch: master + path: ./app/dev/ +``` + +## 覆写 Kustomize 配置 + +```yaml +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: bucket-app +spec: + components: + - name: bucket-comp + type: kustomize + properties: + # ...omitted for brevity + path: ./app/ + +``` + diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/components/built-in/more.md b/i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/components/built-in/more.md new file mode 100644 index 00000000..2729fdf4 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/components/built-in/more.md @@ -0,0 +1,37 @@ +--- +title: 获取更多 +--- + +KubeVela 中的模块完全都是可定制和可插拔的,所以除了内置的组件之外,你还可以通过如下的方式获取更多。 + +## 1. 从官方或第三方能力中心获取模块化能力 + +可以通过 KubeVela 的 [Kubectl 插件](../../../developers/references/kubectl-plugin#install-kubectl-vela-plugin)获取官方能力中心中发布的能力。 + +### 查看能力中心的模块列表 + +默认情况下,命令会从 KubeVela 官方维护的[能力中心](https://registry.kubevela.net)中获取模块化功能。 + +例如,让我们尝试列出注册表中所有可用的组件,使用 `--discover` 这个标志位: + +```shell +$ kubectl vela comp --discover +Showing components from registry: oss://registry.kubevela.net +NAME REGISTRY DEFINITION +webserver default deployments.apps +``` + +### 从能力中心安装模块 + +然后你可以安装一个组件,如: + +```shell +$ kubectl vela comp get webserver +Installing component capability webserver +Successfully install component: webserver +``` + +## 2. 自定义模块化能力 + +* 阅读[管理模块化功能](../../cue/definition-edit),学习对已有的模块化能力进行修改和编辑。 +* 从头开始[自定义模块化能力](../../cue/advanced),并了解自定义组件的[更多用法和功能](../custom-component)。 \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/components/built-in/overview.md b/i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/components/built-in/overview.md new file mode 100644 index 00000000..e5a09ab0 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/components/built-in/overview.md @@ -0,0 +1,25 @@ +--- +title: 组件总览 +--- + +``` +$ vela components +NAME NAMESPACE WORKLOAD DESCRIPTION +alibaba-ack vela-system configurations.terraform.core.oam.dev Terraform configuration for Alibaba Cloud ACK cluster +alibaba-oss vela-system configurations.terraform.core.oam.dev Terraform configuration for Alibaba Cloud OSS object +alibaba-rds vela-system configurations.terraform.core.oam.dev Terraform configuration for Alibaba Cloud RDS object +helm vela-system autodetects.core.oam.dev helm release is a group of K8s resources from either git + repository or helm repo +kustomize vela-system autodetects.core.oam.dev kustomize can fetching, building, updating and applying + Kustomize manifests from git repo. +my-stateful vela-system statefulsets.apps My StatefulSet component. +raw vela-system autodetects.core.oam.dev raw allow users to specify raw K8s object in properties +task vela-system jobs.batch Describes jobs that run code or a script to completion. +webservice vela-system deployments.apps Describes long-running, scalable, containerized services + that have a stable network endpoint to receive external + network traffic from customers. +wei-stateful vela-system statefulsets.apps My StatefulSet component. +worker vela-system deployments.apps Describes long-running, scalable, containerized services + that running at backend. They do NOT have network endpoint + to receive external network traffic. +``` \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/components/built-in/raw.md b/i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/components/built-in/raw.md new file mode 100644 index 00000000..8d2b4c53 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/components/built-in/raw.md @@ -0,0 +1,32 @@ +--- +title: Raw +--- + +直接使用原生的 Kubernetes 资源。比如一个 Job。 + +## 如何使用 + +```yaml +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: app-raw +spec: + components: + - name: myjob + type: raw + properties: + apiVersion: batch/v1 + kind: Job + metadata: + name: pi + spec: + template: + spec: + containers: + - name: pi + image: perl + command: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"] + restartPolicy: Never + backoffLimit: 4 +``` \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/components/built-in/task.md b/i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/components/built-in/task.md new file mode 100644 index 00000000..69fc8b39 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/components/built-in/task.md @@ -0,0 +1,197 @@ +--- +title: Task +--- + +描述运行代码或脚本以完成的作业。 + +## 如何使用 + +```yaml +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: app-worker +spec: + components: + - name: mytask + type: task + properties: + image: perl + count: 10 + cmd: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"] +``` + +## 属性说明 + +```console +# Properties ++----------------+--------------------------------------------------------------------------------------------------+-----------------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++----------------+--------------------------------------------------------------------------------------------------+-----------------------------------+----------+---------+ +| cmd | Commands to run in the container | []string | false | | +| env | Define arguments by using environment variables | [[]env](#env) | false | | +| count | Specify number of tasks to run in parallel | int | true | 1 | +| restart | Define the job restart policy, the value can only be Never or OnFailure. By default, it's Never. | string | true | Never | +| image | Which image would you like to use for your service | string | true | | +| cpu | Number of CPU units for the service, like `0.5` (0.5 CPU core), `1` (1 CPU core) | string | false | | +| memory | Specifies the attributes of the memory resource required for the container. | string | false | | +| volumes | Declare volumes and volumeMounts | [[]volumes](#volumes) | false | | +| livenessProbe | Instructions for assessing whether the container is alive. | [livenessProbe](#livenessProbe) | false | | +| readinessProbe | Instructions for assessing whether the container is in a suitable state to serve traffic. | [readinessProbe](#readinessProbe) | false | | ++----------------+--------------------------------------------------------------------------------------------------+-----------------------------------+----------+---------+ + + +########### readinessProbe ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ +| exec | Instructions for assessing container health by executing a command. Either this attribute or the | [exec](#exec) | false | | +| | httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive | | | | +| | with both the httpGet attribute and the tcpSocket attribute. | | | | +| httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute | [httpGet](#httpGet) | false | | +| | 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. | | | | +| tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the | [tcpSocket](#tcpSocket) | false | | +| | exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with | | | | +| | both the exec attribute and the httpGet attribute. | | | | +| 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 | int | true | 3 | +| | not ready (readiness probe). | | | | ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ + + +############### tcpSocket ++------+---------------------------------------------------------------------------------------+------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++------+---------------------------------------------------------------------------------------+------+----------+---------+ +| port | The TCP socket within the container that should be probed to assess container health. | int | true | | ++------+---------------------------------------------------------------------------------------+------+----------+---------+ + + +############# httpGet ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ +| path | The endpoint, relative to the port, to which the HTTP GET request should be directed. | string | true | | +| port | The TCP socket within the container to which the HTTP GET request should be directed. | int | true | | +| httpHeaders | | [[]httpHeaders](#httpHeaders) | false | | ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ + + +############## httpHeaders ++-------+-------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-------+-------------+--------+----------+---------+ +| name | | string | true | | +| value | | string | true | | ++-------+-------------+--------+----------+---------+ + + +############ exec ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ +| command | A command to be executed inside the container to assess its health. Each space delimited token of | []string | true | | +| | the command is a separate array element. Commands exiting 0 are considered to be successful probes, | | | | +| | whilst all other exit codes are considered failures. | | | | ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ + + +###### livenessProbe ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ +| exec | Instructions for assessing container health by executing a command. Either this attribute or the | [exec](#exec) | false | | +| | httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive | | | | +| | with both the httpGet attribute and the tcpSocket attribute. | | | | +| httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute | [httpGet](#httpGet) | false | | +| | 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. | | | | +| tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the | [tcpSocket](#tcpSocket) | false | | +| | exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with | | | | +| | both the exec attribute and the httpGet attribute. | | | | +| 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 | int | true | 3 | +| | not ready (readiness probe). | | | | ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ + + +########## tcpSocket ++------+---------------------------------------------------------------------------------------+------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++------+---------------------------------------------------------------------------------------+------+----------+---------+ +| port | The TCP socket within the container that should be probed to assess container health. | int | true | | ++------+---------------------------------------------------------------------------------------+------+----------+---------+ + + +######## httpGet ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ +| path | The endpoint, relative to the port, to which the HTTP GET request should be directed. | string | true | | +| port | The TCP socket within the container to which the HTTP GET request should be directed. | int | true | | +| httpHeaders | | [[]httpHeaders](#httpHeaders) | false | | ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ + + +######### httpHeaders ++-------+-------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-------+-------------+--------+----------+---------+ +| name | | string | true | | +| value | | string | true | | ++-------+-------------+--------+----------+---------+ + + +####### exec ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ +| command | A command to be executed inside the container to assess its health. Each space delimited token of | []string | true | | +| | the command is a separate array element. Commands exiting 0 are considered to be successful probes, | | | | +| | whilst all other exit codes are considered failures. | | | | ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ + + +##### volumes ++-----------+---------------------------------------------------------------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-----------+---------------------------------------------------------------------+--------+----------+---------+ +| name | | string | true | | +| mountPath | | string | true | | +| type | Specify volume type, options: "pvc","configMap","secret","emptyDir" | string | true | | ++-----------+---------------------------------------------------------------------+--------+----------+---------+ + + +## env ++-----------+-----------------------------------------------------------+-------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-----------+-----------------------------------------------------------+-------------------------+----------+---------+ +| name | Environment variable name | string | true | | +| value | The value of the environment variable | string | false | | +| valueFrom | Specifies a source the value of this var should come from | [valueFrom](#valueFrom) | false | | ++-----------+-----------------------------------------------------------+-------------------------+----------+---------+ + + +### valueFrom ++--------------+--------------------------------------------------+-------------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++--------------+--------------------------------------------------+-------------------------------+----------+---------+ +| secretKeyRef | Selects a key of a secret in the pod's namespace | [secretKeyRef](#secretKeyRef) | true | | ++--------------+--------------------------------------------------+-------------------------------+----------+---------+ + + +#### secretKeyRef ++------+------------------------------------------------------------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++------+------------------------------------------------------------------+--------+----------+---------+ +| name | The name of the secret in the pod's namespace to select from | string | true | | +| key | The key of the secret to select from. Must be a valid secret key | string | true | | ++------+------------------------------------------------------------------+--------+----------+---------+ +``` \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/components/built-in/webservice.md b/i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/components/built-in/webservice.md new file mode 100644 index 00000000..9ff9bb61 --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/components/built-in/webservice.md @@ -0,0 +1,208 @@ +--- +title: Web Service +--- + +描述在后端运行的长时间运行、可扩展、容器化的服务,对外提供服务。 + +## 如何使用 + +```YAML +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: website +spec: + components: + - name: frontend + type: webservice + properties: + image: oamdev/testapp:v1 + cmd: ["node", "server.js"] + port: 8080 + cpu: "0.1" + env: + - name: FOO + value: bar + - name: FOO + valueFrom: + secretKeyRef: + name: bar + key: bar +``` + +## 属性说明 + +```console +$ vela show webservice +# Properties ++------------------+-------------------------------------------------------------------------------------------+-----------------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++------------------+-------------------------------------------------------------------------------------------+-----------------------------------+----------+---------+ +| cmd | Commands to run in the container | []string | false | | +| env | Define arguments by using environment variables | [[]env](#env) | false | | +| image | Which image would you like to use for your service | string | true | | +| port | Which port do you want customer traffic sent to | int | true | 80 | +| 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 | | +| memory | Specifies the attributes of the memory resource required for the container. | string | false | | +| volumes | Declare volumes and volumeMounts | [[]volumes](#volumes) | false | | +| livenessProbe | Instructions for assessing whether the container is alive. | [livenessProbe](#livenessProbe) | false | | +| readinessProbe | Instructions for assessing whether the container is in a suitable state to serve traffic. | [readinessProbe](#readinessProbe) | false | | +| imagePullSecrets | Specify image pull secrets for your service | []string | false | | ++------------------+-------------------------------------------------------------------------------------------+-----------------------------------+----------+---------+ + + +########### readinessProbe ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ +| exec | Instructions for assessing container health by executing a command. Either this attribute or the | [exec](#exec) | false | | +| | httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive | | | | +| | with both the httpGet attribute and the tcpSocket attribute. | | | | +| httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute | [httpGet](#httpGet) | false | | +| | 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. | | | | +| tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the | [tcpSocket](#tcpSocket) | false | | +| | exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with | | | | +| | both the exec attribute and the httpGet attribute. | | | | +| 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 | int | true | 3 | +| | not ready (readiness probe). | | | | ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ + + +############### tcpSocket ++------+---------------------------------------------------------------------------------------+------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++------+---------------------------------------------------------------------------------------+------+----------+---------+ +| port | The TCP socket within the container that should be probed to assess container health. | int | true | | ++------+---------------------------------------------------------------------------------------+------+----------+---------+ + + +############# httpGet ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ +| path | The endpoint, relative to the port, to which the HTTP GET request should be directed. | string | true | | +| port | The TCP socket within the container to which the HTTP GET request should be directed. | int | true | | +| httpHeaders | | [[]httpHeaders](#httpHeaders) | false | | ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ + + +############## httpHeaders ++-------+-------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-------+-------------+--------+----------+---------+ +| name | | string | true | | +| value | | string | true | | ++-------+-------------+--------+----------+---------+ + + +############ exec ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ +| command | A command to be executed inside the container to assess its health. Each space delimited token of | []string | true | | +| | the command is a separate array element. Commands exiting 0 are considered to be successful probes, | | | | +| | whilst all other exit codes are considered failures. | | | | ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ + + +###### livenessProbe ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ +| exec | Instructions for assessing container health by executing a command. Either this attribute or the | [exec](#exec) | false | | +| | httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive | | | | +| | with both the httpGet attribute and the tcpSocket attribute. | | | | +| httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute | [httpGet](#httpGet) | false | | +| | 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. | | | | +| tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the | [tcpSocket](#tcpSocket) | false | | +| | exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with | | | | +| | both the exec attribute and the httpGet attribute. | | | | +| 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 | int | true | 3 | +| | not ready (readiness probe). | | | | ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ + + +########## tcpSocket ++------+---------------------------------------------------------------------------------------+------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++------+---------------------------------------------------------------------------------------+------+----------+---------+ +| port | The TCP socket within the container that should be probed to assess container health. | int | true | | ++------+---------------------------------------------------------------------------------------+------+----------+---------+ + + +######## httpGet ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ +| path | The endpoint, relative to the port, to which the HTTP GET request should be directed. | string | true | | +| port | The TCP socket within the container to which the HTTP GET request should be directed. | int | true | | +| httpHeaders | | [[]httpHeaders](#httpHeaders) | false | | ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ + + +######### httpHeaders ++-------+-------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-------+-------------+--------+----------+---------+ +| name | | string | true | | +| value | | string | true | | ++-------+-------------+--------+----------+---------+ + + +####### exec ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ +| command | A command to be executed inside the container to assess its health. Each space delimited token of | []string | true | | +| | the command is a separate array element. Commands exiting 0 are considered to be successful probes, | | | | +| | whilst all other exit codes are considered failures. | | | | ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ + + +##### volumes ++-----------+---------------------------------------------------------------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-----------+---------------------------------------------------------------------+--------+----------+---------+ +| name | | string | true | | +| mountPath | | string | true | | +| type | Specify volume type, options: "pvc","configMap","secret","emptyDir" | string | true | | ++-----------+---------------------------------------------------------------------+--------+----------+---------+ + + +## env ++-----------+-----------------------------------------------------------+-------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-----------+-----------------------------------------------------------+-------------------------+----------+---------+ +| name | Environment variable name | string | true | | +| value | The value of the environment variable | string | false | | +| valueFrom | Specifies a source the value of this var should come from | [valueFrom](#valueFrom) | false | | ++-----------+-----------------------------------------------------------+-------------------------+----------+---------+ + + +### valueFrom ++--------------+--------------------------------------------------+-------------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++--------------+--------------------------------------------------+-------------------------------+----------+---------+ +| secretKeyRef | Selects a key of a secret in the pod's namespace | [secretKeyRef](#secretKeyRef) | true | | ++--------------+--------------------------------------------------+-------------------------------+----------+---------+ + + +#### secretKeyRef ++------+------------------------------------------------------------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++------+------------------------------------------------------------------+--------+----------+---------+ +| name | The name of the secret in the pod's namespace to select from | string | true | | +| key | The key of the secret to select from. Must be a valid secret key | string | true | | ++------+------------------------------------------------------------------+--------+----------+---------+ +``` \ No newline at end of file diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/components/built-in/worker.md b/i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/components/built-in/worker.md new file mode 100644 index 00000000..bd5dc7de --- /dev/null +++ b/i18n/zh/docusaurus-plugin-content-docs/current/platform-engineers/components/built-in/worker.md @@ -0,0 +1,199 @@ +--- +title: Worker +--- + +描述在后端运行的长时间运行、可扩展、容器化的服务。它不对外提供访问。 + +## 如何使用 + +```yaml +apiVersion: core.oam.dev/v1beta1 +kind: Application +metadata: + name: app-worker +spec: + components: + - name: myworker + type: worker + properties: + image: "busybox" + cmd: + - sleep + - "1000" +``` + +## 属性说明 + +```console +$ vela show worker +# Properties ++------------------+-------------------------------------------------------------------------------------------+-----------------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++------------------+-------------------------------------------------------------------------------------------+-----------------------------------+----------+---------+ +| cmd | Commands to run in the container | []string | false | | +| env | Define arguments by using environment variables | [[]env](#env) | false | | +| 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 | | +| memory | Specifies the attributes of the memory resource required for the container. | string | false | | +| volumes | Declare volumes and volumeMounts | [[]volumes](#volumes) | false | | +| livenessProbe | Instructions for assessing whether the container is alive. | [livenessProbe](#livenessProbe) | false | | +| readinessProbe | Instructions for assessing whether the container is in a suitable state to serve traffic. | [readinessProbe](#readinessProbe) | false | | +| imagePullSecrets | Specify image pull secrets for your service | []string | false | | ++------------------+-------------------------------------------------------------------------------------------+-----------------------------------+----------+---------+ + + +########### readinessProbe ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ +| exec | Instructions for assessing container health by executing a command. Either this attribute or the | [exec](#exec) | false | | +| | httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive | | | | +| | with both the httpGet attribute and the tcpSocket attribute. | | | | +| httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute | [httpGet](#httpGet) | false | | +| | 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. | | | | +| tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the | [tcpSocket](#tcpSocket) | false | | +| | exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with | | | | +| | both the exec attribute and the httpGet attribute. | | | | +| 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 | int | true | 3 | +| | not ready (readiness probe). | | | | ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ + + +############### tcpSocket ++------+---------------------------------------------------------------------------------------+------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++------+---------------------------------------------------------------------------------------+------+----------+---------+ +| port | The TCP socket within the container that should be probed to assess container health. | int | true | | ++------+---------------------------------------------------------------------------------------+------+----------+---------+ + + +############# httpGet ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ +| path | The endpoint, relative to the port, to which the HTTP GET request should be directed. | string | true | | +| port | The TCP socket within the container to which the HTTP GET request should be directed. | int | true | | +| httpHeaders | | [[]httpHeaders](#httpHeaders) | false | | ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ + + +############## httpHeaders ++-------+-------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-------+-------------+--------+----------+---------+ +| name | | string | true | | +| value | | string | true | | ++-------+-------------+--------+----------+---------+ + + +############ exec ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ +| command | A command to be executed inside the container to assess its health. Each space delimited token of | []string | true | | +| | the command is a separate array element. Commands exiting 0 are considered to be successful probes, | | | | +| | whilst all other exit codes are considered failures. | | | | ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ + + +###### livenessProbe ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ +| exec | Instructions for assessing container health by executing a command. Either this attribute or the | [exec](#exec) | false | | +| | httpGet attribute or the tcpSocket attribute MUST be specified. This attribute is mutually exclusive | | | | +| | with both the httpGet attribute and the tcpSocket attribute. | | | | +| httpGet | Instructions for assessing container health by executing an HTTP GET request. Either this attribute | [httpGet](#httpGet) | false | | +| | 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. | | | | +| tcpSocket | Instructions for assessing container health by probing a TCP socket. Either this attribute or the | [tcpSocket](#tcpSocket) | false | | +| | exec attribute or the httpGet attribute MUST be specified. This attribute is mutually exclusive with | | | | +| | both the exec attribute and the httpGet attribute. | | | | +| 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 | int | true | 3 | +| | not ready (readiness probe). | | | | ++---------------------+------------------------------------------------------------------------------------------------------+-------------------------+----------+---------+ + + +########## tcpSocket ++------+---------------------------------------------------------------------------------------+------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++------+---------------------------------------------------------------------------------------+------+----------+---------+ +| port | The TCP socket within the container that should be probed to assess container health. | int | true | | ++------+---------------------------------------------------------------------------------------+------+----------+---------+ + + +######## httpGet ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ +| path | The endpoint, relative to the port, to which the HTTP GET request should be directed. | string | true | | +| port | The TCP socket within the container to which the HTTP GET request should be directed. | int | true | | +| httpHeaders | | [[]httpHeaders](#httpHeaders) | false | | ++-------------+---------------------------------------------------------------------------------------+-------------------------------+----------+---------+ + + +######### httpHeaders ++-------+-------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-------+-------------+--------+----------+---------+ +| name | | string | true | | +| value | | string | true | | ++-------+-------------+--------+----------+---------+ + + +####### exec ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ +| command | A command to be executed inside the container to assess its health. Each space delimited token of | []string | true | | +| | the command is a separate array element. Commands exiting 0 are considered to be successful probes, | | | | +| | whilst all other exit codes are considered failures. | | | | ++---------+------------------------------------------------------------------------------------------------------+----------+----------+---------+ + + +##### volumes ++-----------+---------------------------------------------------------------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-----------+---------------------------------------------------------------------+--------+----------+---------+ +| name | | string | true | | +| mountPath | | string | true | | +| type | Specify volume type, options: "pvc","configMap","secret","emptyDir" | string | true | | ++-----------+---------------------------------------------------------------------+--------+----------+---------+ + + +## env ++-----------+-----------------------------------------------------------+-------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++-----------+-----------------------------------------------------------+-------------------------+----------+---------+ +| name | Environment variable name | string | true | | +| value | The value of the environment variable | string | false | | +| valueFrom | Specifies a source the value of this var should come from | [valueFrom](#valueFrom) | false | | ++-----------+-----------------------------------------------------------+-------------------------+----------+---------+ + + +### valueFrom ++--------------+--------------------------------------------------+-------------------------------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++--------------+--------------------------------------------------+-------------------------------+----------+---------+ +| secretKeyRef | Selects a key of a secret in the pod's namespace | [secretKeyRef](#secretKeyRef) | true | | ++--------------+--------------------------------------------------+-------------------------------+----------+---------+ + + +#### secretKeyRef ++------+------------------------------------------------------------------+--------+----------+---------+ +| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | ++------+------------------------------------------------------------------+--------+----------+---------+ +| name | The name of the secret in the pod's namespace to select from | string | true | | +| key | The key of the secret to select from. Must be a valid secret key | string | true | | ++------+------------------------------------------------------------------+--------+----------+---------+ +``` \ No newline at end of file diff --git a/sidebars.js b/sidebars.js index d797b8ba..027907fd 100644 --- a/sidebars.js +++ b/sidebars.js @@ -29,6 +29,12 @@ module.exports = { // 'end-user/initializer-end-user', 'end-user/component-delivery', 'end-user/binding-traits', + 'end-user/cloud-services', + 'end-user/rollout-scaler', + 'end-user/component-observability', + 'end-user/component-dependency-parameter', + 'end-user/multi-app-env-cluster', + // 'end-user/canary-blue-green', v1.1+ 再上 // { // 'Components': [ // 'end-user/components/helm', @@ -52,13 +58,13 @@ module.exports = { 'end-user/policies/envbinding', ] }, - { - 'Workflow': [ - 'end-user/workflow/apply-component', - 'end-user/workflow/apply-remaining', - 'end-user/workflow/multi-env', - ] - }, + // { + // 'Workflow': [ + // 'end-user/workflow/apply-component', + // 'end-user/workflow/apply-remaining', + // 'end-user/workflow/multi-env', + // ] + // }, { 'Debugging': [ // 'end-user/debug/health', @@ -104,6 +110,23 @@ module.exports = { type: 'category', label: 'Component System', items: [ + { + type: 'category', + label: 'Builtin Components', + items: [ + 'platform-engineers/components/built-in/overview', + 'platform-engineers/components/built-in/helm', + 'platform-engineers/components/built-in/kustomize', + 'platform-engineers/components/built-in/raw', + 'platform-engineers/components/built-in/task', + 'platform-engineers/components/built-in/webservice', + 'platform-engineers/components/built-in/worker', + 'platform-engineers/components/built-in/alicloud-ack', + 'platform-engineers/components/built-in/alicloud-oss', + 'platform-engineers/components/built-in/alicloud-rds', + 'platform-engineers/components/built-in/more', + ] + }, 'platform-engineers/components/custom-component', 'platform-engineers/components/component-terraform', ]