Annotations
The annotations trait provides a mechanism to include new annotations in the rendered Kubernetes entities. The annotations are added to the standard metadata
section.
The following snippet contains an example to add two annotations to a component
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: my-app
annotations:
version: "v0.0.1"
description: "My annotations application"
spec:
components:
- name: my-component
type: worker
properties:
image: my-app-image:v1.0.0
cmd: ["cmd"]
traits:
- type: annotations # Set to annotations
properties:
"annotation1": "annotation 1 description" # (Required) key: value annotation
"annotation2": "annotation 2 description"