github.com/oam-dev/kubevela@v1.9.11/docs/examples/traits/container-image/multiple-containers.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: container-image
    18            properties:
    19              # you can use container-image to control multiple containers by filling `containers`
    20              # NOTE: in containers, you must set the container name for each container
    21              containers:
    22                - containerName: busybox
    23                  image: busybox-1.34.0
    24                  imagePullPolicy: IfNotPresent
    25                - containerName: sidecar-nginx
    26                  image: nginx-1.20