github.com/oam-dev/kubevela@v1.9.11/docs/examples/core-definitions/trait/storage.yaml (about)

     1  apiVersion: core.oam.dev/v1beta1
     2  kind: Application
     3  metadata:
     4    name: storage-app
     5  spec:
     6    components:
     7      - name: express-server
     8        type: webservice
     9        properties:
    10          image: crccheck/hello-world
    11          ports:
    12            - port: 8000
    13        traits:
    14          - type: storage
    15            properties:
    16              pvc:
    17                - name: test1
    18                  mountPath: /test/mount/pvc
    19                - name: test1
    20                  mountPath: /test/mount2/pvc
    21                  subPath: sub
    22              configMap:
    23                - name: test1
    24                  mountPath: /test/mount/cm
    25                  items:
    26                    - key: key1
    27                      path: keypath
    28                  data:
    29                    key1: value1
    30                    key2: value2
    31                - name: test2
    32                  mountPath: /test/mount2/cm
    33                  mountToEnv:
    34                    envName: TEST_ENV
    35                    configMapKey: key1
    36                  mountToEnvs:
    37                    - envName: TEST_CM_ENV
    38                      configMapKey: key2
    39                  data:
    40                    key1: value1
    41                    key2: value2
    42              secret:
    43                - name: test1
    44                  mountPath: /test/mount/secret
    45                  items:
    46                    - key: key1
    47                      path: keypath
    48                  stringData:
    49                    key1: value1
    50                    key2: value2
    51                - name: test2
    52                  mountPath: /test/mount2/secret
    53                  mountToEnv:
    54                    envName: TEST_SECRET
    55                    secretKey: key1
    56                  mountToEnvs:
    57                    - envName: TEST_SECRET_ENV_2
    58                      secretKey: key2
    59                    - envName: TEST_SECRET_ENV_3
    60                      secretKey: key3
    61                  data:
    62                    key1: dmFsdWUx
    63                    key2: dmFsdWUy
    64                    key3: dmFsdWUz
    65              emptyDir:
    66                - name: test1
    67                  mountPath: /test/mount/emptydir
    68                - name: test2
    69                  mountPath: /test/mount2/emptydir