github.com/oam-dev/kubevela@v1.9.11/docs/examples/traits/env/single-container.yaml (about)

     1  apiVersion: core.oam.dev/v1beta1
     2  kind: Application
     3  metadata:
     4    name: busybox
     5  spec:
     6    components:
     7      - name: busybox
     8        type: webservice
     9        properties:
    10          image: busybox
    11          cmd: ["sleep", "86400"]
    12        traits:
    13          - type: sidecar
    14            properties:
    15              name: sidecar-nginx
    16              image: nginx
    17          - type: env
    18            properties:
    19              # by default, the following environment variable will be patched to the main container -> busybox in this case
    20              env:
    21                key_first: value_first
    22                key_second: value_second
    23  
    24              # if you want to patch the sidecar container, specify the container name explicitly
    25              # containerName: sidecar-nginx
    26  
    27              # if you want to unset some existing environment variables in the container, use the `unset` parameter
    28              # unset: ["key_existing_first", "key_existing_second"]
    29  
    30              # if you want to clear all the existing environment variables in the container, use the `replace` parameter
    31              # replace: true