workflow
workflow copied to clipboard
Annotating Pods through Deployments
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.
Similar but not quite the same: #545
It seems to be becoming the standard to add features via annotations. There's a long list of things that require them already to function. Please support this!
Agreed. Before annotations were kind of a "useless" feature in Kubernetes from the application's perspective. Now with apps supporting annotations out the wazoo (like kube2iam) I think it makes sense to bring it back to the table for discussion.
If someone feels motivated to work on a deis annotations:list/add/delete feature, that would be cool to see :)
+1 on this, with a concrete use case: Prometheus metrics! The annotations look like:
prometheus.io/scrape:"true"or"false"prometheus.io/port: port number
Then a Prometheus installation will pick up the pods automatically as they're scaled, and I'll get my metrics for APM. :) This particular use case could also really use multiple ports… one for public traffic, one to expose /metrics.
This issue was moved to teamhephy/workflow#32