-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add prometheus scrape annotations to agent #28
Comments
What would be the solution when the service and the agent would like to expose different ports for Prometheus scraping? @objectiser |
Not sure - I created the issue as a reminder to check, but unfortunately haven't yet had time to experiment. There is a prometheus issue discussing the topic with one suggested workaround that requires changing the prometheus scrape config which isn't ideal. |
I agree @objectiser Can we change the agent config to publish to the same port as the service? |
Don't think we can have two processes using the same port within the same pod. |
This should be a good first issue, I think. All work would probably be located in Annotations: map[string]string{
"prometheus.io/scrape": "true",
"prometheus.io/port": "5778",
}, The tests for this should be easy to write as well: a positive case, asserting that a deployment without annotations will get the annotations once the sidecar is injected, and a negative case, where deployments with the annotations won't be touched at all (scrape=false, port=1212, for example) |
Following on from #27, we should add the prometheus scrape/port annotations to the agent.
Issue with the agent as sidecar is to ensure we don't overwrite similar annotations provided by the service.
The text was updated successfully, but these errors were encountered: