Skip to content
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

Enhancement : add Prometheus annotation when extension : metrics + kubernetes are used #126

Closed
snowdrop-bot opened this issue Jun 30, 2020 · 0 comments
Assignees
Labels
7 - Community development upstream/closed The issue has been closed in the upstream repository

Comments

@snowdrop-bot
Copy link
Collaborator

when we are using metrics + kubernetes extensions, should we add those annotations to the pods into the generated file target\kubernetes\kubernetes.yml

I found this in prometheus helm chart documentation : https://github.com/helm/charts/tree/master/stable/prometheus

In order to get prometheus to scrape pods, you must add annotations to the the pods as below:

metadata:
  annotations:
    prometheus.io/scrape: "true"
    prometheus.io/path: /metrics
    prometheus.io/port: "8080"
spec:

I tested by adding

kubectl annotate pods iep-monitoring-junk-f8fbbdbb9-84jkt prometheus.io/scrape="true"
kubectl annotate pods iep-monitoring-junk-f8fbbdbb9-84jkt prometheus.io/path=/metrics
kubectl annotate pods iep-monitoring-junk-f8fbbdbb9-84jkt prometheus.io/port="8080"

and Prometheus started to scrape metrics from my application.


quarkusio#10301


$upstream:10301$

@snowdrop-bot snowdrop-bot added 7 - Community development upstream/closed The issue has been closed in the upstream repository labels Jun 30, 2020
@iocanel iocanel closed this as completed Jul 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7 - Community development upstream/closed The issue has been closed in the upstream repository
Projects
None yet
Development

No branches or pull requests

3 participants