Skip to content

Commit 19568df

Browse files
committed
Merge branch 'main' into chore/upgrade_docusaurus_version
Resolved conflict in docs/end-user/definition-version-control.md by: - Keeping the proper closing code block markers - Including the new CUE-based definitions section from main
2 parents 05c5079 + 4a2a015 commit 19568df

File tree

9 files changed

+131
-10
lines changed

9 files changed

+131
-10
lines changed

docs/end-user/components/cloud-services/provision-and-consume-database.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ Deploy and verify the application.
6666

6767
```shell
6868
$ vela ls
69+
```
70+
71+
The output would look like the below:
72+
73+
```shell
6974
APP COMPONENT TYPE TRAITS PHASE HEALTHY STATUS CREATED-TIME
7075
webapp express-server webservice service-binding running healthy 2021-09-08 16:50:41 +0800 CST
7176
├─ sample-db alibaba-rds running healthy 2021-09-08 16:50:41 +0800 CST
@@ -74,6 +79,11 @@ webapp express-server webservice service-binding running healthy
7479

7580
```shell
7681
$ vela port-forward webapp
82+
```
83+
84+
The output would look like the below:
85+
86+
```shell
7787
Forwarding from 127.0.0.1:8080 -> 80
7888
Forwarding from [::1]:8080 -> 80
7989

docs/end-user/components/cloud-services/provision-and-initiate-database.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ After the application is successfully deployed, you can access the web applicati
9393

9494
```shell
9595
$ vela ls
96+
```
97+
98+
The output would look like the below:
99+
100+
```shell
96101
APP COMPONENT TYPE TRAITS PHASE HEALTHY STATUS CREATED-TIME
97102
favorite-links web webservice service-binding running healthy Ready:1/1 2022-02-21 14:15:45 +0800 CST
98103
└─ db alibaba-rds-preview running healthy Cloud resources are deployed and ready to use 2022-02-21 14:15:45 +0800 CST
@@ -101,6 +106,10 @@ favorite-links web webservice service-binding running healthy Rea
101106

102107
```shell
103108
$ vela port-forward favorite-links 4000:4000
109+
```
110+
The output would look like the below:
111+
112+
```shell
104113
Forwarding from 127.0.0.1:4000 -> 4000
105114
Forwarding from [::1]:4000 -> 4000
106115

docs/end-user/components/cloud-services/provision-cloud-resources-by-crossplane.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,33 @@ title: Crossplane
55
The guide [Deploy Cloud Services](../../../tutorials/consume-cloud-services.md) shows how to provision cloud resources by Terraform in
66
CLI and VelaUX. This tutorial will talk about how to provision Cloud Resources by [Crossplane](https://crossplane.io/).
77

8+
At present, considering the Crossplane Addon is still in experimental stage, please execute the below statement to activate addon registry by vela cli and use them.
9+
10+
```shell
11+
vela addon registry add experimental --type helm --endpoint=https://kubevela.github.io/catalog/experimental/
12+
```
13+
14+
You can view the registry added by executing:
15+
16+
```shell
17+
vela addon registry list
18+
```
19+
20+
The output would look like the below:
21+
22+
```shell
23+
Name Type URL
24+
experimental helm https://kubevela.github.io/catalog/experimental/
25+
```
26+
827
Let's take cloud provider AWS as an example.
928

1029
## Enable addon `crossplane-aws`
1130

31+
:::note
32+
Enabling the Crossplane AWS add-on may override your Terraform definition if the Terraform add-on was already enabled.
33+
:::
34+
1235
```shell
1336
vela addon enable crossplane-aws
1437
```
@@ -46,7 +69,7 @@ metadata:
4669
spec:
4770
components:
4871
- name: dev
49-
type: crossplane-aws-s3
72+
type: aws-s3
5073
properties:
5174
name: kubevela-test-0714
5275
acl: private
@@ -58,7 +81,7 @@ After the application gets `running`, you can check the bucket by AWS [cli](http
5881
```shell
5982
$ vela ls
6083
APP COMPONENT TYPE TRAITS PHASE HEALTHY STATUS CREATED-TIME
61-
s3-poc dev crossplane-aws-s3 running healthy 2022-06-16 15:37:15 +0800 CST
84+
s3-poc dev aws-s3 running healthy 2022-06-16 15:37:15 +0800 CST
6285
6386
$ aws s3 ls
6487
2022-06-16 15:37:17 kubevela-test-0714

docs/end-user/definition-version-control.md

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ spec:
5656
```
5757

5858
2. Create a `configmap-component` ComponentDefinition with `2.0.5` version
59-
```apiVersion: core.oam.dev/v1beta1
59+
```
60+
apiVersion: core.oam.dev/v1beta1
6061
kind: ComponentDefinition
6162
metadata:
6263
name: configmap-component
@@ -90,7 +91,8 @@ my-component-v2.5.0 2 e61e9b5e55b01c2b Component
9091
```
9192

9293
4. Create Application using `configmap-component@v1.2` version and enable the Auto Update using `app.oam.dev/autoUpdate` annotation.
93-
```apiVersion: core.oam.dev/v1beta1
94+
```
95+
apiVersion: core.oam.dev/v1beta1
9496
kind: Application
9597
metadata:
9698
name: test-app
@@ -142,4 +144,39 @@ spec:
142144
my-component-v1.2.5 1 1a4f3ac77e4fcfef Component
143145
my-component-v1.2.7 3 86d7fb1a36566dea Component
144146
my-component-v2.5.0 2 e61e9b5e55b01c2b Component
145-
`
147+
```
148+
149+
## Adding a `version` Field in CUE-based Definitions
150+
Include the version field inside the attributes section in your .cue file to enable semantic versioning. If you do not require semantic versioning, you may omit the version field.
151+
Example:
152+
```
153+
"configmap-creater": {
154+
type: "component"
155+
attributes: {
156+
workload: definition: {
157+
apiVersion: "v1"
158+
kind: "ConfigMap"
159+
}
160+
version: "1.1.1"
161+
}
162+
}
163+
164+
template: {
165+
output: {
166+
apiVersion: "v1"
167+
kind: "ConfigMap"
168+
metadata: {
169+
name: parameter.name
170+
namespace: context.namespace
171+
}
172+
data: parameter.data
173+
}
174+
175+
parameter: {
176+
// +usage=Name of the ConfigMap.
177+
name: string
178+
// +usage=Data to be stored in the ConfigMap.
179+
data: [string]: string
180+
}
181+
}
182+
```

docs/reference/addons/terraform.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ KubeVela can support the following cloud providers by enabling the Terraform pro
1818

1919
```shell
2020
$ vela addon list | grep terraform-
21+
```
22+
23+
The output would look like the below:
24+
25+
```shell
2126
terraform-alibaba KubeVela Kubernetes Terraform Controller for Alibaba Cloud [1.0.2, 1.0.1] enabled (1.0.2)
2227
terraform-tencent KubeVela Kubernetes Terraform Controller Provider for Tencent Cloud [1.0.0, 1.0.1] enabled (1.0.0)
2328
terraform-aws KubeVela Kubernetes Terraform Controller for AWS [1.0.0, 1.0.1] enabled (1.0.0)
774 KB
Loading

docs/resources/java-war.jpg

467 KB
Loading

docs/tutorials/custom-image-delivery.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ If so, you could change the `webservice` definition.
1313

1414
> This way is only suitable for the UI users.
1515
16-
![image](https://static.kubevela.net/images/1.5/custom-ui-schema.jpg)
16+
![image](../resources/custom-ui-schema.jpg)
1717

1818
On the definition detail page, users could customize the UI schema to setting the UI forms. For example, if you want to hide the ExposeType field, only need to set the disable is `true`.
1919

@@ -297,7 +297,7 @@ spec:
297297
type: deploy
298298
```
299299
300-
![java-app](https://static.kubevela.net/images/1.5/java-war.jpg)
300+
![java-app](../resources/java-war.jpg)
301301
302302
This example includes three components, and the order service depends on the catalog and the customer services. The developer only needs to care about the war package URL and the tomcat/JRE version, they are familiar to the Java developer. The developer should upload the war package to a repository, such as Jfrog. Get a download URL to assign to the `warURL` field.
303303

versioned_docs/version-v1.10/end-user/definition-version-control.md

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ spec:
5656
```
5757

5858
2. Create a `configmap-component` ComponentDefinition with `2.0.5` version
59-
```apiVersion: core.oam.dev/v1beta1
59+
```
60+
apiVersion: core.oam.dev/v1beta1
6061
kind: ComponentDefinition
6162
metadata:
6263
name: configmap-component
@@ -90,7 +91,8 @@ my-component-v2.5.0 2 e61e9b5e55b01c2b Component
9091
```
9192

9293
4. Create Application using `configmap-component@v1.2` version and enable the Auto Update using `app.oam.dev/autoUpdate` annotation.
93-
```apiVersion: core.oam.dev/v1beta1
94+
```
95+
apiVersion: core.oam.dev/v1beta1
9496
kind: Application
9597
metadata:
9698
name: test-app
@@ -142,4 +144,39 @@ spec:
142144
my-component-v1.2.5 1 1a4f3ac77e4fcfef Component
143145
my-component-v1.2.7 3 86d7fb1a36566dea Component
144146
my-component-v2.5.0 2 e61e9b5e55b01c2b Component
145-
````
147+
````
148+
149+
## Adding a `version` Field in CUE-based Definitions
150+
Include the version field inside the attributes section in your .cue file to enable semantic versioning. If you do not require semantic versioning, you may omit the version field.
151+
Example:
152+
```
153+
"configmap-creater": {
154+
type: "component"
155+
attributes: {
156+
workload: definition: {
157+
apiVersion: "v1"
158+
kind: "ConfigMap"
159+
}
160+
version: "1.1.1"
161+
}
162+
}
163+
164+
template: {
165+
output: {
166+
apiVersion: "v1"
167+
kind: "ConfigMap"
168+
metadata: {
169+
name: parameter.name
170+
namespace: context.namespace
171+
}
172+
data: parameter.data
173+
}
174+
175+
parameter: {
176+
// +usage=Name of the ConfigMap.
177+
name: string
178+
// +usage=Data to be stored in the ConfigMap.
179+
data: [string]: string
180+
}
181+
}
182+
```

0 commit comments

Comments
 (0)