mirror of
https://github.com/kubevela/kubevela.git
synced 2026-05-19 07:46:51 +00:00
* Feat: enhance env trait Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Fix: enhance container image trait Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Feat: add command trait Signed-off-by: Somefive <yd219913@alibaba-inc.com> * Fix: add test Signed-off-by: Somefive <yd219913@alibaba-inc.com>
32 lines
1.0 KiB
YAML
32 lines
1.0 KiB
YAML
apiVersion: core.oam.dev/v1beta1
|
|
kind: Application
|
|
metadata:
|
|
name: busybox
|
|
spec:
|
|
components:
|
|
- name: busybox
|
|
type: webservice
|
|
properties:
|
|
image: busybox
|
|
cmd: ["sleep", "86400"]
|
|
traits:
|
|
- type: sidecar
|
|
properties:
|
|
name: sidecar-nginx
|
|
image: nginx
|
|
- type: env
|
|
properties:
|
|
# by default, the following environment variable will be patched to the main container -> busybox in this case
|
|
env:
|
|
key_first: value_first
|
|
key_second: value_second
|
|
|
|
# if you want to patch the sidecar container, specify the container name explicitly
|
|
# containerName: sidecar-nginx
|
|
|
|
# if you want to unset some existing environment variables in the container, use the `unset` parameter
|
|
# unset: ["key_existing_first", "key_existing_second"]
|
|
|
|
# if you want to clear all the existing environment variables in the container, use the `replace` parameter
|
|
# replace: true
|