# Code generated by KubeVela templates. DO NOT EDIT. Please edit the original cue file.
# Definition source cue file: vela-templates/definitions/internal/annotations.cue
apiVersion: core.oam.dev/v1beta1
kind: TraitDefinition
metadata:
  annotations:
    definition.oam.dev/description: Add annotations on K8s pod for your workload which follows the pod spec in path 'spec.template'.
  labels:
    custom.definition.oam.dev/ui-hidden: "true"
  name: annotations
  namespace: {{ include "systemDefinitionNamespace" . }}
spec:
  appliesToWorkloads:
    - '*'
  podDisruptive: true
  schematic:
    cue:
      template: |
        // +patchStrategy=jsonMergePatch
        patch: {
        	metadata: annotations: {
        		for k, v in parameter {
        			"\(k)": v
        		}
        	}
        	if context.output.spec != _|_ && context.output.spec.template != _|_ {
        		spec: template: metadata: annotations: {
        			for k, v in parameter {
        				"\(k)": v
        			}
        		}
        	}
        }
        parameter: [string]: string | null

