Annotating Pods through Deployments #747
Description
For a variety of implementations it's necessary to attach annotations to Pods (kube2iam, k8s alpha features e.g. Node Affinity/Anti-Affinity, etc.). Normally one would add the annotation to the Deployment's .spec.template.metadata.annotations
, resulting in each Pod carrying the proper annotation.
However, with Deis Workflow this is currently impossible to achieve, or at least persist. One can run kubectl edit deployment myapp-dev-cmd -n myapp-dev
and add the desired annotation to .spec.template.metadata.annotations
but this would be lost once a new version of the app is released.
Can we allow for a way to annotate Pods? Either through a deis
command or by at least persisting the Deployment's set .spec.template.metadata.annotations
when a new version is rolled out. This would allow for the combined use of existing k8s implementations with Deis Workflow.