Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Annotating Pods through Deployments #747

Open
mirague opened this issue Mar 1, 2017 · 5 comments
Open

Annotating Pods through Deployments #747

mirague opened this issue Mar 1, 2017 · 5 comments

Comments

@mirague
Copy link

mirague commented Mar 1, 2017

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.

@mirague
Copy link
Author

mirague commented Mar 1, 2017

Similar but not quite the same: #545

@blakebarnett
Copy link

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!

@bacongobbler
Copy link
Member

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 :)

@BrianHicks
Copy link

+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.

@Cryptophobia
Copy link

This issue was moved to teamhephy/workflow#32

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants