Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 926 Bytes

09-Setting-Common-Labels-and-Annotations.md

File metadata and controls

36 lines (27 loc) · 926 Bytes

Setting Common Labels and Annotations

We're also capable of adding meta information to the objects

cat >> deploy/vote/staging/kustomization.yaml << EOF

commonAnnotations:
  supported-by: [email protected]
EOF

Verify the changes are correct by showing the output via:

kustomize build deploy/vote/staging/staging/

Commit and deliver the changes

git add deploy/
git commit -m "chore: Add Annotations to vote application in the staging environment"
git push origin HEAD:refs/heads/main

Label updates

Beaware that labels applied to a Deployments are immutable so any changes to them would require a new Deployment to be generated. In our case we can take advantage of Flux capabilities by deleting the deployment and having the system creating a new one right after.

cat >> deploy/vote/staging/kustomization.yaml << EOF
commonLabels:
  project: instavote
  env: staging
EOF