Skip to content

feat: ability to disable Prometheus scraping while keeping the metrics endpoint enabled #1367

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ksubileau
Copy link
Contributor

What does this PR do?

Adds a metrics.prometheus.scrape value to be able to configure the value of the prometheus.io/scrape annotation, set it as true by default to keep existing behavior

Motivation

Sometimes it may be useful to be able to enable the metrics endpoint without actually enabling metrics collection.
However, currently, the chart enables both the endpoint and the metrics collection by default, and the only option offered is to disable both at once by setting metrics.prometheus to null.

In my specific use case, Traefik is deployed on an infrastructure where a monitoring tool is configured to automatically collect all metrics from pods with the prometheus.io/scrape annotation set to true (which is pretty standard so far). But I need to be able to set the annotation value to false to disable this generic collection and use another specific collector that will route the metrics differently.

More

  • Yes, I updated the tests accordingly
  • Yes, I updated the schema accordingly
  • Yes, I ran make test and all the tests passed

@darkweaver87
Copy link
Contributor

Hello @ksubileau ,

Thank you for your interest.
We’re unsure about the use case and the traction it will receive. We are going to leave the status as kind/proposal to give the community time to let us know if they would like this idea.

We will reevaluate as people respond.

@darkweaver87 darkweaver87 added the kind/proposal a proposal that needs to be discussed. label Mar 24, 2025
@mloiseleur mloiseleur added bot/no-merge kind/proposal a proposal that needs to be discussed. and removed kind/proposal a proposal that needs to be discussed. labels Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot/no-merge kind/proposal a proposal that needs to be discussed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants