github.com/oam-dev/kubevela@v1.9.11/docs/examples/traits/command/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: command
    18            properties:
    19              # by default, the following command will replace the command declared in the main container -> busybox
    20              command: ["sleep", "8640000"]
    21  
    22              # if you want to patch the sidecar container, specify the container name explicitly
    23              # containerName: sidecar-nginx
    24  
    25              # if you want to replace the existing args in the container, use the `args` parameter
    26              # args: ["86400"]
    27  
    28              # if you want to append args to the existing args, use the `addArgs` parameter
    29              # addArgs: ["86400"]
    30  
    31              # if you want to delete args to the existing args, use the `delArgs` parameter
    32              # delArgs: ["86400"]