github.com/oam-dev/kubevela@v1.9.11/docs/examples/terraform/cloud-resource-provision-and-consume/application.yaml (about) 1 apiVersion: core.oam.dev/v1beta1 2 kind: Application 3 metadata: 4 name: webapp 5 spec: 6 components: 7 - name: express-server 8 type: webservice 9 properties: 10 image: zzxwill/flask-web-application:v0.3.1-crossplane 11 ports: 80 12 traits: 13 - type: service-binding 14 properties: 15 envMappings: 16 # environments refer to db-conn secret 17 DB_PASSWORD: 18 secret: db-conn # 1) If the env name is the same as the secret key, secret key can be omitted. 19 endpoint: 20 secret: db-conn 21 key: DB_HOST # 2) If the env name is different from secret key, secret key has to be set. 22 username: 23 secret: db-conn 24 key: DB_USER 25 # environments refer to oss-conn secret 26 BUCKET_NAME: 27 secret: oss-conn 28 29 - name: sample-db 30 type: alibaba-rds 31 properties: 32 instance_name: sample-db 33 account_name: oamtest 34 password: U34rfwefwefffaked 35 writeConnectionSecretToRef: 36 name: db-conn 37 38 - name: sample-oss 39 type: alibaba-oss 40 properties: 41 bucket: vela-website 42 acl: private 43 writeConnectionSecretToRef: 44 name: oss-conn