Fix(typo): fix typos in docs
This commit is contained in:
parent
255c5fb8f4
commit
756eab6e58
|
|
@ -88,7 +88,7 @@ Since you now have domain configured globally in deployment environment, you don
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# in demo environment
|
# in demo environment
|
||||||
servcies:
|
services:
|
||||||
express-server:
|
express-server:
|
||||||
...
|
...
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,5 @@ title: Build CI/CD Pipeline
|
||||||
|
|
||||||
TBD, Content Overview:
|
TBD, Content Overview:
|
||||||
|
|
||||||
1. install argo/teckton.
|
1. install argo/tekton.
|
||||||
2. run the pipeline example: https://github.com/oam-dev/kubevela/tree/master/docs/examples/argo
|
2. run the pipeline example: https://github.com/oam-dev/kubevela/tree/master/docs/examples/argo
|
||||||
|
|
@ -22,7 +22,7 @@ className="unique-tabs"
|
||||||
defaultValue="minikube"
|
defaultValue="minikube"
|
||||||
values={[
|
values={[
|
||||||
{label: 'Minikube', value: 'minikube'},
|
{label: 'Minikube', value: 'minikube'},
|
||||||
{label: 'KinD', value: 'kind'},
|
{label: 'Kind', value: 'kind'},
|
||||||
]}>
|
]}>
|
||||||
<TabItem value="minikube">
|
<TabItem value="minikube">
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ spec:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Save above `ComponentDefintion` objects to files and install them to your Kubernetes cluster by `$ kubectl apply -f stateless-def.yaml task-def.yaml`
|
Save above `ComponentDefinition` objects to files and install them to your Kubernetes cluster by `$ kubectl apply -f stateless-def.yaml task-def.yaml`
|
||||||
|
|
||||||
## Declare an `Application`
|
## Declare an `Application`
|
||||||
|
|
||||||
|
|
@ -173,7 +173,7 @@ spec:
|
||||||
|
|
||||||
## CUE `Context`
|
## CUE `Context`
|
||||||
|
|
||||||
KubeVela allows you to reference the runtime information of your application via `conext` keyword.
|
KubeVela allows you to reference the runtime information of your application via `context` keyword.
|
||||||
|
|
||||||
The most widely used context is application name(`context.appName`) component name(`context.name`).
|
The most widely used context is application name(`context.appName`) component name(`context.name`).
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -394,7 +394,7 @@ price: 200
|
||||||
feel: "bad"
|
feel: "bad"
|
||||||
```
|
```
|
||||||
|
|
||||||
Another example is to use bool type as prameter.
|
Another example is to use bool type as parameter.
|
||||||
|
|
||||||
```
|
```
|
||||||
parameter: {
|
parameter: {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ In this section, we will introduce how to use cue template create resources in d
|
||||||
By default, the `metadata.namespace` of K8s resource in CUE template is automatically filled with the same namespace of the application.
|
By default, the `metadata.namespace` of K8s resource in CUE template is automatically filled with the same namespace of the application.
|
||||||
|
|
||||||
If you want to create K8s resources running in a specific namespace witch is different with the application, you can set the `metadata.namespace` field.
|
If you want to create K8s resources running in a specific namespace witch is different with the application, you can set the `metadata.namespace` field.
|
||||||
KubeVela will create the resources in the specified namespace, and create a resourceTracker object as owener of those resources.
|
KubeVela will create the resources in the specified namespace, and create a resourceTracker object as owner of those resources.
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
|
||||||
|
|
@ -82,15 +82,15 @@ Let's explain them in detail.
|
||||||
|
|
||||||
This field defines the constraints that what kinds of workloads this trait is allowed to apply to.
|
This field defines the constraints that what kinds of workloads this trait is allowed to apply to.
|
||||||
- It accepts an array of string as value.
|
- It accepts an array of string as value.
|
||||||
- Each item in the array refers to one or a group of workload types to which this trait is allowded to apply.
|
- Each item in the array refers to one or a group of workload types to which this trait is allowed to apply.
|
||||||
|
|
||||||
There are three approaches to denote one or a group of workload types.
|
There are three approaches to denote one or a group of workload types.
|
||||||
|
|
||||||
- `ComponentDefinition` definition reference (CRD name), e.g., `deployments.apps`
|
- `ComponentDefinition` definition reference (CRD name), e.g., `deployments.apps`
|
||||||
- Resource group of `ComponentDefinition` definition reference prefixed with `*.`, e.g., `*.apps`, `*.oam.dev`. This means the trait is allowded to apply to any workloads in this group.
|
- Resource group of `ComponentDefinition` definition reference prefixed with `*.`, e.g., `*.apps`, `*.oam.dev`. This means the trait is allowed to apply to any workloads in this group.
|
||||||
- `*` means this trait is allowded to apply to any workloads
|
- `*` means this trait is allowed to apply to any workloads
|
||||||
|
|
||||||
If this field is omitted, it means this trait is allowded to apply to any workload types.
|
If this field is omitted, it means this trait is allowed to apply to any workload types.
|
||||||
|
|
||||||
KubeVela will raise an error if a trait is applied to a workload type which is NOT included in the `appliesToWorkloads`.
|
KubeVela will raise an error if a trait is applied to a workload type which is NOT included in the `appliesToWorkloads`.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ context:{
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Trait will not have the `context.ouput`, other fields are the same.
|
Trait will not have the `context.output`, other fields are the same.
|
||||||
|
|
||||||
|
|
||||||
Please refer to [this doc](https://github.com/oam-dev/kubevela/blob/master/docs/examples/app-with-status/template.yaml) for the complete example.
|
Please refer to [this doc](https://github.com/oam-dev/kubevela/blob/master/docs/examples/app-with-status/template.yaml) for the complete example.
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ environment demo updated, Namespace: demo, Email: my@email.com
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# in demo environment
|
# in demo environment
|
||||||
servcies:
|
services:
|
||||||
express-server:
|
express-server:
|
||||||
...
|
...
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,5 @@ title: Build CI/CD Pipeline
|
||||||
|
|
||||||
TBD, Content Overview:
|
TBD, Content Overview:
|
||||||
|
|
||||||
1. install argo/teckton.
|
1. install argo/tekton.
|
||||||
2. run the pipeline example: https://github.com/oam-dev/kubevela/tree/master/docs/examples/argo
|
2. run the pipeline example: https://github.com/oam-dev/kubevela/tree/master/docs/examples/argo
|
||||||
|
|
@ -96,7 +96,7 @@ spec:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Save above `ComponentDefintion` objects to files and install them to your Kubernetes cluster by `$ kubectl apply -f stateless-def.yaml task-def.yaml`
|
Save above `ComponentDefinition` objects to files and install them to your Kubernetes cluster by `$ kubectl apply -f stateless-def.yaml task-def.yaml`
|
||||||
|
|
||||||
## Declare an `Application`
|
## Declare an `Application`
|
||||||
|
|
||||||
|
|
@ -173,7 +173,7 @@ spec:
|
||||||
|
|
||||||
## CUE `Context`
|
## CUE `Context`
|
||||||
|
|
||||||
KubeVela allows you to reference the runtime information of your application via `conext` keyword.
|
KubeVela allows you to reference the runtime information of your application via `context` keyword.
|
||||||
|
|
||||||
The most widely used context is application name(`context.appName`) component name(`context.name`).
|
The most widely used context is application name(`context.appName`) component name(`context.name`).
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ spec:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
将上面的 `ComponentDefintion` 对象保存到文件中,并通过 `$ kubectl apply -f stateless-def.yaml task-def.yaml` 将它们安装到你的 Kubernetes 集群。
|
将上面的 `ComponentDefinition` 对象保存到文件中,并通过 `$ kubectl apply -f stateless-def.yaml task-def.yaml` 将它们安装到你的 Kubernetes 集群。
|
||||||
|
|
||||||
## 声明一个 `Application`
|
## 声明一个 `Application`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ In this section, we will introduce how to use cue template create resources (wor
|
||||||
By default, the `metadata.namespace` of K8s resource in CuE template is automatically filled with the same namespace of the applicaiton.
|
By default, the `metadata.namespace` of K8s resource in CuE template is automatically filled with the same namespace of the applicaiton.
|
||||||
|
|
||||||
If you want to create K8s resources running in a specific namespace witch is different with the application, you can set the `metadata.namespace` field.
|
If you want to create K8s resources running in a specific namespace witch is different with the application, you can set the `metadata.namespace` field.
|
||||||
KubeVela will create the resources in the specified namespace, and create a resourceTracker object as owener of those resources.
|
KubeVela will create the resources in the specified namespace, and create a resourceTracker object as owner of those resources.
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ context:{
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Trait will not have the `context.ouput`, other fields are the same.
|
Trait will not have the `context.output`, other fields are the same.
|
||||||
|
|
||||||
|
|
||||||
Please refer to [this doc](https://github.com/oam-dev/kubevela/blob/master/docs/examples/app-with-status/template.yaml) for the complete example.
|
Please refer to [this doc](https://github.com/oam-dev/kubevela/blob/master/docs/examples/app-with-status/template.yaml) for the complete example.
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ environment demo updated, Namespace: demo, Email: my@email.com
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# in demo environment
|
# in demo environment
|
||||||
servcies:
|
services:
|
||||||
express-server:
|
express-server:
|
||||||
...
|
...
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,5 @@ title: Build CI/CD Pipeline
|
||||||
|
|
||||||
TBD, Content Overview:
|
TBD, Content Overview:
|
||||||
|
|
||||||
1. install argo/teckton.
|
1. install argo/tekton.
|
||||||
2. run the pipeline example: https://github.com/oam-dev/kubevela/tree/master/docs/examples/argo
|
2. run the pipeline example: https://github.com/oam-dev/kubevela/tree/master/docs/examples/argo
|
||||||
|
|
@ -11,7 +11,7 @@ Configures Canary deployment strategy for your application.
|
||||||
List of all configuration options for a `Rollout` trait.
|
List of all configuration options for a `Rollout` trait.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
servcies:
|
services:
|
||||||
express-server:
|
express-server:
|
||||||
...
|
...
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ spec:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Save above `ComponentDefintion` objects to files and install them to your Kubernetes cluster by `$ kubectl apply -f stateless-def.yaml task-def.yaml`
|
Save above `ComponentDefinition` objects to files and install them to your Kubernetes cluster by `$ kubectl apply -f stateless-def.yaml task-def.yaml`
|
||||||
|
|
||||||
## Declare an `Application`
|
## Declare an `Application`
|
||||||
|
|
||||||
|
|
@ -173,7 +173,7 @@ spec:
|
||||||
|
|
||||||
## CUE `Context`
|
## CUE `Context`
|
||||||
|
|
||||||
KubeVela allows you to reference the runtime information of your application via `conext` keyword.
|
KubeVela allows you to reference the runtime information of your application via `context` keyword.
|
||||||
|
|
||||||
The most widely used context is application name(`context.appName`) component name(`context.name`).
|
The most widely used context is application name(`context.appName`) component name(`context.name`).
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ In this section, we will introduce how to use cue template create resources (wor
|
||||||
By default, the `metadata.namespace` of K8s resource in CuE template is automatically filled with the same namespace of the applicaiton.
|
By default, the `metadata.namespace` of K8s resource in CuE template is automatically filled with the same namespace of the applicaiton.
|
||||||
|
|
||||||
If you want to create K8s resources running in a specific namespace witch is different with the application, you can set the `metadata.namespace` field.
|
If you want to create K8s resources running in a specific namespace witch is different with the application, you can set the `metadata.namespace` field.
|
||||||
KubeVela will create the resources in the specified namespace, and create a resourceTracker object as owener of those resources.
|
KubeVela will create the resources in the specified namespace, and create a resourceTracker object as owner of those resources.
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ context:{
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Trait 并不包含 `context.ouput` 字段,其他字段都是相同。
|
Trait 并不包含 `context.output` 字段,其他字段都是相同。
|
||||||
|
|
||||||
以下为健康检查的示例:
|
以下为健康检查的示例:
|
||||||
|
|
||||||
|
|
@ -110,7 +110,7 @@ context:{
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Trait 并不包含 `context.ouput` 字段,其他字段都是相同。
|
Trait 并不包含 `context.output` 字段,其他字段都是相同。
|
||||||
|
|
||||||
Component 健康检查示例请参考 [这篇文章](https://github.com/oam-dev/kubevela/blob/master/docs/examples/app-with-status/template.yaml) 。
|
Component 健康检查示例请参考 [这篇文章](https://github.com/oam-dev/kubevela/blob/master/docs/examples/app-with-status/template.yaml) 。
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ Since you now have domain configured globally in deployment environment, you don
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# in demo environment
|
# in demo environment
|
||||||
servcies:
|
services:
|
||||||
express-server:
|
express-server:
|
||||||
...
|
...
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,5 @@ title: Build CI/CD Pipeline
|
||||||
|
|
||||||
TBD, Content Overview:
|
TBD, Content Overview:
|
||||||
|
|
||||||
1. install argo/teckton.
|
1. install argo/tekton.
|
||||||
2. run the pipeline example: https://github.com/oam-dev/kubevela/tree/master/docs/examples/argo
|
2. run the pipeline example: https://github.com/oam-dev/kubevela/tree/master/docs/examples/argo
|
||||||
|
|
@ -22,7 +22,7 @@ className="unique-tabs"
|
||||||
defaultValue="minikube"
|
defaultValue="minikube"
|
||||||
values={[
|
values={[
|
||||||
{label: 'Minikube', value: 'minikube'},
|
{label: 'Minikube', value: 'minikube'},
|
||||||
{label: 'KinD', value: 'kind'},
|
{label: 'Kind', value: 'kind'},
|
||||||
]}>
|
]}>
|
||||||
<TabItem value="minikube">
|
<TabItem value="minikube">
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -374,7 +374,7 @@ price: 200
|
||||||
feel: "bad"
|
feel: "bad"
|
||||||
```
|
```
|
||||||
|
|
||||||
Another example is to use bool type as prameter.
|
Another example is to use bool type as parameter.
|
||||||
|
|
||||||
```
|
```
|
||||||
parameter: {
|
parameter: {
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ spec:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Save above `ComponentDefintion` objects to files and install them to your Kubernetes cluster by `$ kubectl apply -f stateless-def.yaml task-def.yaml`
|
Save above `ComponentDefinition` objects to files and install them to your Kubernetes cluster by `$ kubectl apply -f stateless-def.yaml task-def.yaml`
|
||||||
|
|
||||||
## Declare an `Application`
|
## Declare an `Application`
|
||||||
|
|
||||||
|
|
@ -173,7 +173,7 @@ spec:
|
||||||
|
|
||||||
## CUE `Context`
|
## CUE `Context`
|
||||||
|
|
||||||
KubeVela allows you to reference the runtime information of your application via `conext` keyword.
|
KubeVela allows you to reference the runtime information of your application via `context` keyword.
|
||||||
|
|
||||||
The most widely used context is application name(`context.appName`) component name(`context.name`).
|
The most widely used context is application name(`context.appName`) component name(`context.name`).
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ In this section, we will introduce how to use cue template create resources in d
|
||||||
By default, the `metadata.namespace` of K8s resource in CUE template is automatically filled with the same namespace of the application.
|
By default, the `metadata.namespace` of K8s resource in CUE template is automatically filled with the same namespace of the application.
|
||||||
|
|
||||||
If you want to create K8s resources running in a specific namespace witch is different with the application, you can set the `metadata.namespace` field.
|
If you want to create K8s resources running in a specific namespace witch is different with the application, you can set the `metadata.namespace` field.
|
||||||
KubeVela will create the resources in the specified namespace, and create a resourceTracker object as owener of those resources.
|
KubeVela will create the resources in the specified namespace, and create a resourceTracker object as owner of those resources.
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ context:{
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Trait will not have the `context.ouput`, other fields are the same.
|
Trait will not have the `context.output`, other fields are the same.
|
||||||
|
|
||||||
The example of health check likes below:
|
The example of health check likes below:
|
||||||
|
|
||||||
|
|
@ -111,7 +111,7 @@ context:{
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Trait will not have the `context.ouput`, other fields are the same.
|
Trait will not have the `context.output`, other fields are the same.
|
||||||
|
|
||||||
|
|
||||||
Please refer to [this doc](https://github.com/oam-dev/kubevela/blob/master/docs/examples/app-with-status/template.yaml) for the complete example.
|
Please refer to [this doc](https://github.com/oam-dev/kubevela/blob/master/docs/examples/app-with-status/template.yaml) for the complete example.
|
||||||
|
|
|
||||||
|
|
@ -83,16 +83,16 @@ Let's explain them in detail.
|
||||||
|
|
||||||
This field defines the constraints that what kinds of workloads this trait is allowed to apply to.
|
This field defines the constraints that what kinds of workloads this trait is allowed to apply to.
|
||||||
- It accepts an array of string as value.
|
- It accepts an array of string as value.
|
||||||
- Each item in the array refers to one or a group of workload types to which this trait is allowded to apply.
|
- Each item in the array refers to one or a group of workload types to which this trait is allowed to apply.
|
||||||
|
|
||||||
There are four approaches to denote one or a group of workload types.
|
There are four approaches to denote one or a group of workload types.
|
||||||
|
|
||||||
- `ComponentDefinition` name, e.g., `webservice`, `worker`
|
- `ComponentDefinition` name, e.g., `webservice`, `worker`
|
||||||
- `ComponentDefinition` definition reference (CRD name), e.g., `deployments.apps`
|
- `ComponentDefinition` definition reference (CRD name), e.g., `deployments.apps`
|
||||||
- Resource group of `ComponentDefinition` definition reference prefixed with `*.`, e.g., `*.apps`, `*.oam.dev`. This means the trait is allowded to apply to any workloads in this group.
|
- Resource group of `ComponentDefinition` definition reference prefixed with `*.`, e.g., `*.apps`, `*.oam.dev`. This means the trait is allowed to apply to any workloads in this group.
|
||||||
- `*` means this trait is allowded to apply to any workloads
|
- `*` means this trait is allowed to apply to any workloads
|
||||||
|
|
||||||
If this field is omitted, it means this trait is allowded to apply to any workload types.
|
If this field is omitted, it means this trait is allowed to apply to any workload types.
|
||||||
|
|
||||||
KubeVela will raise an error if a trait is applied to a workload which is NOT included in the `appliesToWorkloads`.
|
KubeVela will raise an error if a trait is applied to a workload which is NOT included in the `appliesToWorkloads`.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ Hence, the `properties` section of `backend` only exposes two parameters to fill
|
||||||
|
|
||||||
Traits (`TraitDefinition` API) are operational features provided by the platform. A trait augments the component instance with operational behaviors such as load balancing policy, network ingress routing, auto-scaling policies, or upgrade strategies, etc.
|
Traits (`TraitDefinition` API) are operational features provided by the platform. A trait augments the component instance with operational behaviors such as load balancing policy, network ingress routing, auto-scaling policies, or upgrade strategies, etc.
|
||||||
|
|
||||||
To attach a trait to component instance, the user will declare `.type` field to reference the specific `TraitDefinition`, and `.properties` field to set property values of the given trait. Similarly, `TraitDefiniton` also allows you to define *template* for operational features.
|
To attach a trait to component instance, the user will declare `.type` field to reference the specific `TraitDefinition`, and `.properties` field to set property values of the given trait. Similarly, `TraitDefinition` also allows you to define *template* for operational features.
|
||||||
|
|
||||||
In the above example, `type: autoscaler` in `frontend` means the specification (i.e. `properties` section) of this trait will be enforced by a `TraitDefinition` object named `autoscaler` as below:
|
In the above example, `type: autoscaler` in `frontend` means the specification (i.e. `properties` section) of this trait will be enforced by a `TraitDefinition` object named `autoscaler` as below:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ Since you now have domain configured globally in deployment environment, you don
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# in demo environment
|
# in demo environment
|
||||||
servcies:
|
services:
|
||||||
express-server:
|
express-server:
|
||||||
...
|
...
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,5 @@ title: Build CI/CD Pipeline
|
||||||
|
|
||||||
TBD, Content Overview:
|
TBD, Content Overview:
|
||||||
|
|
||||||
1. install argo/teckton.
|
1. install argo/tekton.
|
||||||
2. run the pipeline example: https://github.com/oam-dev/kubevela/tree/master/docs/examples/argo
|
2. run the pipeline example: https://github.com/oam-dev/kubevela/tree/master/docs/examples/argo
|
||||||
|
|
@ -22,7 +22,7 @@ className="unique-tabs"
|
||||||
defaultValue="minikube"
|
defaultValue="minikube"
|
||||||
values={[
|
values={[
|
||||||
{label: 'Minikube', value: 'minikube'},
|
{label: 'Minikube', value: 'minikube'},
|
||||||
{label: 'KinD', value: 'kind'},
|
{label: 'Kind', value: 'kind'},
|
||||||
]}>
|
]}>
|
||||||
<TabItem value="minikube">
|
<TabItem value="minikube">
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -394,7 +394,7 @@ price: 200
|
||||||
feel: "bad"
|
feel: "bad"
|
||||||
```
|
```
|
||||||
|
|
||||||
Another example is to use bool type as prameter.
|
Another example is to use bool type as parameter.
|
||||||
|
|
||||||
```
|
```
|
||||||
parameter: {
|
parameter: {
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ spec:
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Save above `ComponentDefintion` objects to files and install them to your Kubernetes cluster by `$ kubectl apply -f stateless-def.yaml task-def.yaml`
|
Save above `ComponentDefinition` objects to files and install them to your Kubernetes cluster by `$ kubectl apply -f stateless-def.yaml task-def.yaml`
|
||||||
|
|
||||||
## Declare an `Application`
|
## Declare an `Application`
|
||||||
|
|
||||||
|
|
@ -173,7 +173,7 @@ spec:
|
||||||
|
|
||||||
## CUE `Context`
|
## CUE `Context`
|
||||||
|
|
||||||
KubeVela allows you to reference the runtime information of your application via `conext` keyword.
|
KubeVela allows you to reference the runtime information of your application via `context` keyword.
|
||||||
|
|
||||||
The most widely used context is application name(`context.appName`) component name(`context.name`).
|
The most widely used context is application name(`context.appName`) component name(`context.name`).
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ In this section, we will introduce how to use cue template create resources in d
|
||||||
By default, the `metadata.namespace` of K8s resource in CUE template is automatically filled with the same namespace of the application.
|
By default, the `metadata.namespace` of K8s resource in CUE template is automatically filled with the same namespace of the application.
|
||||||
|
|
||||||
If you want to create K8s resources running in a specific namespace witch is different with the application, you can set the `metadata.namespace` field.
|
If you want to create K8s resources running in a specific namespace witch is different with the application, you can set the `metadata.namespace` field.
|
||||||
KubeVela will create the resources in the specified namespace, and create a resourceTracker object as owener of those resources.
|
KubeVela will create the resources in the specified namespace, and create a resourceTracker object as owner of those resources.
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ context:{
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Trait will not have the `context.ouput`, other fields are the same.
|
Trait will not have the `context.output`, other fields are the same.
|
||||||
|
|
||||||
|
|
||||||
Please refer to [this doc](https://github.com/oam-dev/kubevela/blob/master/docs/examples/app-with-status/template.yaml) for the complete example.
|
Please refer to [this doc](https://github.com/oam-dev/kubevela/blob/master/docs/examples/app-with-status/template.yaml) for the complete example.
|
||||||
|
|
|
||||||
|
|
@ -82,15 +82,15 @@ Let's explain them in detail.
|
||||||
|
|
||||||
This field defines the constraints that what kinds of workloads this trait is allowed to apply to.
|
This field defines the constraints that what kinds of workloads this trait is allowed to apply to.
|
||||||
- It accepts an array of string as value.
|
- It accepts an array of string as value.
|
||||||
- Each item in the array refers to one or a group of workload types to which this trait is allowded to apply.
|
- Each item in the array refers to one or a group of workload types to which this trait is allowed to apply.
|
||||||
|
|
||||||
There are three approaches to denote one or a group of workload types.
|
There are three approaches to denote one or a group of workload types.
|
||||||
|
|
||||||
- `ComponentDefinition` definition reference (CRD name), e.g., `deployments.apps`
|
- `ComponentDefinition` definition reference (CRD name), e.g., `deployments.apps`
|
||||||
- Resource group of `ComponentDefinition` definition reference prefixed with `*.`, e.g., `*.apps`, `*.oam.dev`. This means the trait is allowded to apply to any workloads in this group.
|
- Resource group of `ComponentDefinition` definition reference prefixed with `*.`, e.g., `*.apps`, `*.oam.dev`. This means the trait is allowed to apply to any workloads in this group.
|
||||||
- `*` means this trait is allowded to apply to any workloads
|
- `*` means this trait is allowed to apply to any workloads
|
||||||
|
|
||||||
If this field is omitted, it means this trait is allowded to apply to any workload types.
|
If this field is omitted, it means this trait is allowed to apply to any workload types.
|
||||||
|
|
||||||
KubeVela will raise an error if a trait is applied to a workload type which is NOT included in the `appliesToWorkloads`.
|
KubeVela will raise an error if a trait is applied to a workload type which is NOT included in the `appliesToWorkloads`.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue