github.com/oam-dev/kubevela@v1.9.11/docs/examples/traits/labels/example.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 labels: 13 label-key: label-value 14 to-delete-label-key: to-delete-label-value 15 traits: 16 # the `labels` trait will add/delete label key/value pair to the 17 # labels of the workload and the template inside the spec of the workload (if exists) 18 # 1. if original labels contains the key, value will be overridden 19 # 2. if original labels do not contain the key, value will be added 20 # 3. if original labels contains the key and the value is null, the key will be removed 21 - type: labels 22 properties: 23 added-label-key: added-label-value 24 label-key: modified-label-value 25 to-delete-label-key: null