refactor the structure

Signed-off-by: Jianbo Sun <jianbo.sjb@alibaba-inc.com>
This commit is contained in:
Jianbo Sun 2022-05-18 19:24:37 +08:00
parent 4da3c722a5
commit d9cb5061fe
18 changed files with 338 additions and 192 deletions

View File

@ -2,9 +2,15 @@
title: Needs More
---
* Refer to [All Component References](./references) to learn all built-in supported artifacts supported for delivery.
KubeVela is programmable, you have the following ways to discover and extend the platform.
* Get more from [install addons](../../how-to/cli/addon/addon).
* Refer to the following links to learn more built-in capabilities:
- [Built-in Component Reference](./references)
- [Built-in Trait Reference](../traits/references)
- [Built-in Policy Reference](../policies/references)
- [Built-in Workflow Step Reference](../workflow/built-in-workflow-defs)
* Get more capabilities from [installing addons](../../how-to/cli/addon/addon), you can refer to [the overview of official addons](../../reference/addons/overview) for more details.
* Extend KubeVela by yourself

View File

@ -640,30 +640,92 @@ Name | Description | Type | Required | Default
### Examples
1. Prepare a Kubernetes Secret
The secret can be manually created, or generated by other component or external system.
For example, we have a secret `db-conn-example` whose data is as below:
```yaml
endpoint: https://xxx.com
password: 123
username: myname
```
2. Bind the Secret into your component by `service-binding` trait
For example, we have a webservice component who needs to consume a database. The database connection string should be set
to Pod environments: `endpoint`, `username` and `DB_PASSWORD`.
We can set the properties for envMappings as below. For each environment, `secret` represents the secret name, and `key`
represents the key of the secret.
Here is the complete properties for the trait.
```yaml
traits:
- type: service-binding
properties:
envMappings:
DB_PASSWORD:
secret: db-conn-example
key: password
endpoint:
secret: db-conn-example
key: endpoint
username:
secret: db-conn-example
key: username
```
In particular, if the environment name, like `endpoint`, is same to the `key` of the secret, we can omit the `key`.
So we can simplify the properties as below.
```yaml
traits:
- type: service-binding
properties:
envMappings:
DB_PASSWORD:
secret: db-conn-example
key: password
endpoint:
secret: db-conn-example
username:
secret: db-conn-example
```
We can finally prepare an Application for the business component `binding-test-comp` to consume the secret, which is a
representative of a database cloud resource.
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: init-secret-with-http
namespace: default
name: webapp
spec:
components:
- name: my-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
traits:
- type: service-binding
- name: binding-test-comp
type: webservice
properties:
envMappings:
MY_ENV:
secret: secret1
MY_ENV2:
secret: secret2
key: test
image: zzxwill/flask-web-application:v0.3.1-crossplane
ports: 80
traits:
- type: service-binding
properties:
envMappings:
# environments refer to db-conn secret
DB_PASSWORD:
secret: db-conn-example
key: password
endpoint:
secret: db-conn-example
username:
secret: db-conn-example
```
Deploy this YAML and the Secret `db-conn-example` will be binding into environment of workload.
## sidecar
The `sidecar` trait allows you to attach a sidecar container to the component.

View File

@ -109,7 +109,7 @@ spec:
**Overview**
Send notifications. You can use the notification to send email, slack, ding talk and lark.
Send notifications. You can use the notification to send notifications to Email, DingTalk, Slack, Lark.
**Parameters**
@ -214,6 +214,10 @@ spec:
body: test-body
```
* Expected outcome
we can see that before and after the deployment of the application, the messages can be seen in the corresponding group chat.
## webhook
**Overview**

View File

@ -1,5 +1,5 @@
---
title: Integrate with CI system by Triggers
title: Integrate by Triggers
description: Integrate with CI system by Triggers
---

View File

@ -1,5 +1,5 @@
---
title: Cloud Services
title: Deploy Cloud Services
description: This section introduces the delivery of services provided by cloud vendors through KubeVela and orchestrating your services in the Kubernetes cluster.
---

View File

@ -1,5 +1,5 @@
---
title: Helm Chart
title: Deploy Helm Chart
---
This section introduces that how you deploy Helm Chart into multi-environments and clusters.

View File

@ -1,5 +1,5 @@
---
title: Kubernetes Objects
title: Deploy Kubernetes Objects
---
This section introduces that how you can deploy Kubernetes objects into multi environments and clusters.

View File

@ -1,5 +1,5 @@
---
title: Container Image
title: Deploy Container Image
description: deploy the business application by kubevela
---

View File

@ -25,29 +25,28 @@ module.exports = {
items: [
{
type: 'category',
label: 'Artifacts',
collapsed: false,
label: 'Container Image CD',
collapsed: true,
items: [
'tutorials/webservice',
'tutorials/helm',
'case-studies/multi-cluster',
'end-user/traits/rollout',
'end-user/traits/ingress',
'end-user/traits/sidecar',
'tutorials/k8s-object',
'tutorials/consume-cloud-services',
'end-user/components/more',
],
},
'case-studies/multi-cluster',
{
type: 'category',
label: 'CI Integration',
collapsed: false,
label: 'Helm Chart CD',
collapsed: true,
items: [
'tutorials/jenkins',
'tutorials/trigger',
'case-studies/gitops',
'tutorials/helm',
],
},
{
'How-to manage the cloud resources': [
'Cloud Resources CD': [
'tutorials/consume-cloud-services',
'end-user/components/cloud-services/provision-and-consume-cloud-services',
'end-user/components/cloud-services/provision-and-initiate-database',
'end-user/components/cloud-services/secure-your-database-connection',
@ -55,15 +54,38 @@ module.exports = {
],
},
{
'Day-2 Operations': [
'end-user/traits/rollout',
'end-user/traits/ingress',
'end-user/traits/service-binding',
'end-user/traits/sidecar',
'end-user/policies/health',
'end-user/workflow/webhook-notification',
type: 'category',
label: 'Kubernetes Manifest CD',
collapsed: true,
items: [
'tutorials/k8s-object',
],
},
{
type: 'category',
label: 'CI Integration',
collapsed: true,
items: [
'tutorials/jenkins',
'tutorials/trigger',
'how-to/dashboard/trigger/overview',
'end-user/traits/more',
'case-studies/gitops',
],
},
{
'How-to manage the applications': [
'how-to/dashboard/application/create-application',
'how-to/dashboard/application/bind-new-environment',
'tutorials/workflows',
'how-to/dashboard/application/deploy-application',
'how-to/dashboard/application/get-application-instance',
'tutorials/scaler',
'how-to/dashboard/application/get-application-log',
'how-to/dashboard/application/get-application-endpoint',
'how-to/dashboard/application/view-application-resource',
'how-to/dashboard/application/get-application-revision',
'how-to/dashboard/application/recycle-environment',
'how-to/dashboard/application/delete-application',
],
},
{
@ -75,6 +97,7 @@ module.exports = {
'end-user/service-account-integration',
],
},
'end-user/components/more',
],
},
{
@ -177,22 +200,6 @@ module.exports = {
],
},
'end-user/components/cloud-services/cloud-resources-list',
{
'How-to manage the applications': [
'how-to/dashboard/application/create-application',
'how-to/dashboard/application/bind-new-environment',
'tutorials/workflows',
'how-to/dashboard/application/deploy-application',
'how-to/dashboard/application/get-application-instance',
'tutorials/scaler',
'how-to/dashboard/application/get-application-log',
'how-to/dashboard/application/get-application-endpoint',
'how-to/dashboard/application/view-application-resource',
'how-to/dashboard/application/get-application-revision',
'how-to/dashboard/application/recycle-environment',
'how-to/dashboard/application/delete-application',
],
},
'reference/ui-schema',
'reference/user-improvement-plan',
{

View File

@ -2,9 +2,15 @@
title: Needs More
---
* Refer to [All Component References](./references) to learn all built-in supported artifacts supported for delivery.
KubeVela is programmable, you have the following ways to discover and extend the platform.
* Get more from [install addons](../../how-to/cli/addon/addon).
* Refer to the following links to learn more built-in capabilities:
- [Built-in Component Reference](./references)
- [Built-in Trait Reference](../traits/references)
- [Built-in Policy Reference](../policies/references)
- [Built-in Workflow Step Reference](../workflow/built-in-workflow-defs)
* Get more capabilities from [installing addons](../../how-to/cli/addon/addon), you can refer to [the overview of official addons](../../reference/addons/overview) for more details.
* Extend KubeVela by yourself

View File

@ -640,30 +640,92 @@ Name | Description | Type | Required | Default
### Examples
1. Prepare a Kubernetes Secret
The secret can be manually created, or generated by other component or external system.
For example, we have a secret `db-conn-example` whose data is as below:
```yaml
endpoint: https://xxx.com
password: 123
username: myname
```
2. Bind the Secret into your component by `service-binding` trait
For example, we have a webservice component who needs to consume a database. The database connection string should be set
to Pod environments: `endpoint`, `username` and `DB_PASSWORD`.
We can set the properties for envMappings as below. For each environment, `secret` represents the secret name, and `key`
represents the key of the secret.
Here is the complete properties for the trait.
```yaml
traits:
- type: service-binding
properties:
envMappings:
DB_PASSWORD:
secret: db-conn-example
key: password
endpoint:
secret: db-conn-example
key: endpoint
username:
secret: db-conn-example
key: username
```
In particular, if the environment name, like `endpoint`, is same to the `key` of the secret, we can omit the `key`.
So we can simplify the properties as below.
```yaml
traits:
- type: service-binding
properties:
envMappings:
DB_PASSWORD:
secret: db-conn-example
key: password
endpoint:
secret: db-conn-example
username:
secret: db-conn-example
```
We can finally prepare an Application for the business component `binding-test-comp` to consume the secret, which is a
representative of a database cloud resource.
```yaml
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: init-secret-with-http
namespace: default
name: webapp
spec:
components:
- name: my-server
type: webservice
properties:
image: oamdev/hello-world
port: 8000
traits:
- type: service-binding
- name: binding-test-comp
type: webservice
properties:
envMappings:
MY_ENV:
secret: secret1
MY_ENV2:
secret: secret2
key: test
image: zzxwill/flask-web-application:v0.3.1-crossplane
ports: 80
traits:
- type: service-binding
properties:
envMappings:
# environments refer to db-conn secret
DB_PASSWORD:
secret: db-conn-example
key: password
endpoint:
secret: db-conn-example
username:
secret: db-conn-example
```
Deploy this YAML and the Secret `db-conn-example` will be binding into environment of workload.
## sidecar
The `sidecar` trait allows you to attach a sidecar container to the component.

View File

@ -109,7 +109,7 @@ spec:
**Overview**
Send notifications. You can use the notification to send email, slack, ding talk and lark.
Send notifications. You can use the notification to send notifications to Email, DingTalk, Slack, Lark.
**Parameters**
@ -214,6 +214,10 @@ spec:
body: test-body
```
* Expected outcome
we can see that before and after the deployment of the application, the messages can be seen in the corresponding group chat.
## webhook
**Overview**

View File

@ -1,5 +1,5 @@
---
title: Integrate with CI system by Triggers
title: Integrate by Triggers
description: Integrate with CI system by Triggers
---

View File

@ -1,5 +1,5 @@
---
title: Cloud Services
title: Deploy Cloud Services
description: This section introduces the delivery of services provided by cloud vendors through KubeVela and orchestrating your services in the Kubernetes cluster.
---

View File

@ -1,5 +1,5 @@
---
title: Helm Chart
title: Deploy Helm Chart
---
This section introduces that how you deploy Helm Chart into multi-environments and clusters.

View File

@ -1,5 +1,5 @@
---
title: Kubernetes Objects
title: Deploy Kubernetes Objects
---
This section introduces that how you can deploy Kubernetes objects into multi environments and clusters.

View File

@ -1,5 +1,5 @@
---
title: Container Image
title: Deploy Container Image
description: deploy the business application by kubevela
---

View File

@ -44,9 +44,9 @@
"label": "User Guide",
"items": [
{
"collapsed": false,
"collapsed": true,
"type": "category",
"label": "Artifacts",
"label": "Container Image CD",
"items": [
{
"type": "doc",
@ -54,50 +54,46 @@
},
{
"type": "doc",
"id": "version-v1.3/tutorials/helm"
"id": "version-v1.3/case-studies/multi-cluster"
},
{
"type": "doc",
"id": "version-v1.3/end-user/traits/rollout"
},
{
"type": "doc",
"id": "version-v1.3/end-user/traits/ingress"
},
{
"type": "doc",
"id": "version-v1.3/end-user/traits/sidecar"
},
{
"type": "doc",
"id": "version-v1.3/tutorials/k8s-object"
},
{
"type": "doc",
"id": "version-v1.3/tutorials/consume-cloud-services"
},
{
"type": "doc",
"id": "version-v1.3/end-user/components/more"
}
]
},
{
"type": "doc",
"id": "version-v1.3/case-studies/multi-cluster"
},
{
"collapsed": false,
"type": "category",
"label": "CI Integration",
"items": [
{
"type": "doc",
"id": "version-v1.3/tutorials/jenkins"
},
{
"type": "doc",
"id": "version-v1.3/tutorials/trigger"
},
{
"type": "doc",
"id": "version-v1.3/case-studies/gitops"
}
]
},
{
"collapsed": true,
"type": "category",
"label": "How-to manage the cloud resources",
"label": "Helm Chart CD",
"items": [
{
"type": "doc",
"id": "version-v1.3/tutorials/helm"
}
]
},
{
"collapsed": true,
"type": "category",
"label": "Cloud Resources CD",
"items": [
{
"type": "doc",
"id": "version-v1.3/tutorials/consume-cloud-services"
},
{
"type": "doc",
"id": "version-v1.3/end-user/components/cloud-services/provision-and-consume-cloud-services"
@ -119,31 +115,26 @@
{
"collapsed": true,
"type": "category",
"label": "Day-2 Operations",
"label": "Kubernetes Manifest CD",
"items": [
{
"type": "doc",
"id": "version-v1.3/end-user/traits/rollout"
"id": "version-v1.3/tutorials/k8s-object"
}
]
},
{
"collapsed": true,
"type": "category",
"label": "CI Integration",
"items": [
{
"type": "doc",
"id": "version-v1.3/tutorials/jenkins"
},
{
"type": "doc",
"id": "version-v1.3/end-user/traits/ingress"
},
{
"type": "doc",
"id": "version-v1.3/end-user/traits/service-binding"
},
{
"type": "doc",
"id": "version-v1.3/end-user/traits/sidecar"
},
{
"type": "doc",
"id": "version-v1.3/end-user/policies/health"
},
{
"type": "doc",
"id": "version-v1.3/end-user/workflow/webhook-notification"
"id": "version-v1.3/tutorials/trigger"
},
{
"type": "doc",
@ -151,7 +142,62 @@
},
{
"type": "doc",
"id": "version-v1.3/end-user/traits/more"
"id": "version-v1.3/case-studies/gitops"
}
]
},
{
"collapsed": true,
"type": "category",
"label": "How-to manage the applications",
"items": [
{
"type": "doc",
"id": "version-v1.3/how-to/dashboard/application/create-application"
},
{
"type": "doc",
"id": "version-v1.3/how-to/dashboard/application/bind-new-environment"
},
{
"type": "doc",
"id": "version-v1.3/tutorials/workflows"
},
{
"type": "doc",
"id": "version-v1.3/how-to/dashboard/application/deploy-application"
},
{
"type": "doc",
"id": "version-v1.3/how-to/dashboard/application/get-application-instance"
},
{
"type": "doc",
"id": "version-v1.3/tutorials/scaler"
},
{
"type": "doc",
"id": "version-v1.3/how-to/dashboard/application/get-application-log"
},
{
"type": "doc",
"id": "version-v1.3/how-to/dashboard/application/get-application-endpoint"
},
{
"type": "doc",
"id": "version-v1.3/how-to/dashboard/application/view-application-resource"
},
{
"type": "doc",
"id": "version-v1.3/how-to/dashboard/application/get-application-revision"
},
{
"type": "doc",
"id": "version-v1.3/how-to/dashboard/application/recycle-environment"
},
{
"type": "doc",
"id": "version-v1.3/how-to/dashboard/application/delete-application"
}
]
},
@ -181,6 +227,10 @@
"id": "version-v1.3/end-user/service-account-integration"
}
]
},
{
"type": "doc",
"id": "version-v1.3/end-user/components/more"
}
]
},
@ -446,61 +496,6 @@
"type": "doc",
"id": "version-v1.3/end-user/components/cloud-services/cloud-resources-list"
},
{
"collapsed": true,
"type": "category",
"label": "How-to manage the applications",
"items": [
{
"type": "doc",
"id": "version-v1.3/how-to/dashboard/application/create-application"
},
{
"type": "doc",
"id": "version-v1.3/how-to/dashboard/application/bind-new-environment"
},
{
"type": "doc",
"id": "version-v1.3/tutorials/workflows"
},
{
"type": "doc",
"id": "version-v1.3/how-to/dashboard/application/deploy-application"
},
{
"type": "doc",
"id": "version-v1.3/how-to/dashboard/application/get-application-instance"
},
{
"type": "doc",
"id": "version-v1.3/tutorials/scaler"
},
{
"type": "doc",
"id": "version-v1.3/how-to/dashboard/application/get-application-log"
},
{
"type": "doc",
"id": "version-v1.3/how-to/dashboard/application/get-application-endpoint"
},
{
"type": "doc",
"id": "version-v1.3/how-to/dashboard/application/view-application-resource"
},
{
"type": "doc",
"id": "version-v1.3/how-to/dashboard/application/get-application-revision"
},
{
"type": "doc",
"id": "version-v1.3/how-to/dashboard/application/recycle-environment"
},
{
"type": "doc",
"id": "version-v1.3/how-to/dashboard/application/delete-application"
}
]
},
{
"type": "doc",
"id": "version-v1.3/reference/ui-schema"