mirror of
https://github.com/kubevela/kubevela.git
synced 2026-08-27 16:17:34 +00:00
Add parameters comments for crossplane definitions (#1515)
* Add parameters commetns for crossplane definitions Added parameter comments for ComponentDefinition alibaba-oss alibaba-rds and TraitDefinition service-binding * add the result of vela show
This commit is contained in:
@@ -9,15 +9,22 @@ title: Provision and Consume Cloud Resources
|
||||
Check the parameters of cloud resource component:
|
||||
|
||||
```shell
|
||||
kubectl vela show alibaba-rds
|
||||
$ kubectl vela show alibaba-rds
|
||||
|
||||
# Properties
|
||||
+---------------+------------------------------------------------+--------+----------+--------------------+
|
||||
| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT |
|
||||
+---------------+------------------------------------------------+--------+----------+--------------------+
|
||||
| engine | RDS engine | string | true | mysql |
|
||||
| engineVersion | The version of RDS engine | string | true | 8.0 |
|
||||
| instanceClass | The instance class for the RDS | string | true | rds.mysql.c1.large |
|
||||
| username | RDS username | string | true | |
|
||||
| secretName | Secret name which RDS connection will write to | string | true | |
|
||||
+---------------+------------------------------------------------+--------+----------+--------------------+
|
||||
```
|
||||
|
||||
Use the service binding trait to bind cloud resources into workload as ENV.
|
||||
|
||||
```shell
|
||||
kubectl vela show service-binding
|
||||
```
|
||||
|
||||
Create an application with a cloud resource provisioning component and a consuming component as below.
|
||||
|
||||
```yaml
|
||||
|
||||
@@ -102,13 +102,19 @@ spec:
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
engine: *"mysql" | string
|
||||
// +usage=RDS engine
|
||||
engine: *"mysql" | string
|
||||
// +usage=The version of RDS engine
|
||||
engineVersion: *"8.0" | string
|
||||
// +usage=The instance class for the RDS
|
||||
instanceClass: *"rds.mysql.c1.large" | string
|
||||
username: string
|
||||
secretName: string
|
||||
// +usage=RDS username
|
||||
username: string
|
||||
// +usage=Secret name which RDS connection will write to
|
||||
secretName: string
|
||||
}
|
||||
|
||||
|
||||
```
|
||||
|
||||
### Register ComponentDefinition `alibaba-oss` as OSS cloud resource producer
|
||||
@@ -148,12 +154,18 @@ spec:
|
||||
}
|
||||
}
|
||||
parameter: {
|
||||
name: string
|
||||
acl: *"private" | string
|
||||
storageClass: *"Standard" | string
|
||||
// +usage=OSS bucket name
|
||||
name: string
|
||||
// +usage=The access control list of the OSS bucket
|
||||
acl: *"private" | string
|
||||
// +usage=The storage type of OSS bucket
|
||||
storageClass: *"Standard" | string
|
||||
// +usage=The data Redundancy type of OSS bucket
|
||||
dataRedundancyType: *"LRS" | string
|
||||
secretName: string
|
||||
// +usage=Secret name which RDS connection will write to
|
||||
secretName: string
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
### Register ComponentDefinition `webconsumer` with Secret Reference
|
||||
@@ -310,6 +322,7 @@ spec:
|
||||
}
|
||||
|
||||
parameter: {
|
||||
// +usage=The mapping of environment variables to secret
|
||||
envMappings: [string]: [string]: string
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user