Labels

The labels trait adds additional labels to the Kubernetes generated components (Deployments, Pods, etc.). This can be useful for compatibility with existing integrations in Kubernetes (e.g., monitoring, etc.)

To add extra labels to a component, use:

apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
  name: my-app
spec:
  components:
    - name: my-comp
      type: worker
      properties:
        image: my-app-image:v1.0.0       
      traits:
         - type: labels # Set to labels
           properties:
             "my-label": "company-value" # label