Files
kubevela/docs/examples/core-definitions/trait/storage.yaml
T
Tianxin DongandGitHub d1f56743cc Feat: add core definitions (#2664)
* Feat: add components and storage api-oriented defs

* add some examples

* change the dir

* resolve comments

* make reviewable

* fix example

* add labels and annotations in component

* add config map ref key in env

* add more traits

* add wfstep defs and rename

* fmt the cue

* re-struct all the definitions

* revert deprecated defs and add webhook def

* delete useless network trait

* fix generated tab

* fix indent

* fix webservice

* add labels

* comment webservice and worker's health check

* fix retainkeys

* fix webservice and worker's health check

* add suspend def which will be replaced by internal def

* fix cli and add labels

* fix script

* add ignore

* fix healthscope example
2021-11-29 15:02:16 +08:00

60 lines
1.7 KiB
YAML

apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: storage-app
spec:
components:
- name: express-server
type: webservice
properties:
image: crccheck/hello-world
ports:
- port: 8000
traits:
- type: storage
properties:
pvc:
- name: test1
mountPath: /test/mount/pvc
- name: test2
mountPath: /test/mount2/pvc
configMap:
- name: test1
mountPath: /test/mount/cm
items:
- key: key1
path: keypath
data:
key1: value1
key2: value2
- name: test2
mountPath: /test/mount2/cm
mountToEnv:
envName: TEST_ENV
configMapKey: key1
data:
key1: value1
key2: value2
secret:
- name: test1
mountPath: /test/mount/secret
items:
- key: key1
path: keypath
stringData:
key1: value1
key2: value2
- name: test2
mountPath: /test/mount2/secret
mountToEnv:
envName: TEST_SECRET
secretKey: key1
data:
key1: dmFsdWUx
key2: dmFsdWUy
emptyDir:
- name: test1
mountPath: /test/mount/emptydir
- name: test2
mountPath: /test/mount2/emptydir