Add service-binding trait to chart (#1692)

* Add service-binding trait to chart

Also add docs for the trait.

* Update charts/vela-core/templates/defwithtemplate/service-binding.yaml

Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>

* address comments

Co-authored-by: Jianbo Sun <wonderflow.sun@gmail.com>
This commit is contained in:
Zheng Xi Zhou
2021-05-24 00:41:21 +08:00
committed by GitHub
co-authored by Jianbo Sun
parent 59a8765aa1
commit 27c1eda2a6
4 changed files with 107 additions and 1 deletions
+17 -1
View File
@@ -2,7 +2,10 @@
title: Service Binding
---
Service binding trait will bind data from Kubernetes `Secret` to the application container's ENV. Here is an example.
# Description
Service binding trait will bind data from Kubernetes `Secret` to the application container's ENV.
## Sample
```yaml
apiVersion: core.oam.dev/v1beta1
@@ -40,3 +43,16 @@ spec:
secretName: db-conn
```
For more detailed samples, please reference to [cloud resource](../components/cloud-services)
## Specification
```console
# Properties
+-------------+------------------------------------------------+------------------+----------+---------+
| NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT |
+-------------+------------------------------------------------+------------------+----------+---------+
| envMappings | The mapping of environment variables to secret | map[string]{...} | true | |
+-------------+------------------------------------------------+------------------+----------+---------+
```