commonAnnotations

Add annotations to add all resources.

Add annotations to all resources. If the annotation key already is present on the resource, the value will be overridden.

  1. apiVersion: kustomize.config.k8s.io/v1beta1
  2. kind: Kustomization
  3. commonAnnotations:
  4. oncallPager: 800-555-1212

Example

File Input

  1. # kustomization.yaml
  2. apiVersion: kustomize.config.k8s.io/v1beta1
  3. kind: Kustomization
  4. commonAnnotations:
  5. oncallPager: 800-555-1212
  6. resources:
  7. - deploy.yaml
  1. # deploy.yaml
  2. apiVersion: apps/v1
  3. kind: Deployment
  4. metadata:
  5. name: example
  6. spec:
  7. ...

Build Output

  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: example
  5. annotations:
  6. oncallPager: 800-555-1212
  7. spec:
  8. ...