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

Double scraping of apiserver metrics when using podMonitor #277

Closed
mhowell24 opened this issue May 24, 2022 · 2 comments · Fixed by #279
Closed

Double scraping of apiserver metrics when using podMonitor #277

mhowell24 opened this issue May 24, 2022 · 2 comments · Fixed by #279
Labels
bug Something isn't working

Comments

@mhowell24
Copy link
Contributor

mhowell24 commented May 24, 2022

When the podMonitor is enabled for the metrics server it is double scraped. This is because the metrics server podMonitor is only deployed if prometheus.metricServer.enabled and prometheus.metricServer.podMonitor.enabled. But when prometheus.metricServer.enabled is true the metric server deployment spec has the scrape annotations added. If the podMonitor is enabled then the scrape annotations should be dropped to stop the double scraping.

Happy to put up a PR with a fix if you agree this is an issue.

Expected Behavior

  • The metrics server metrics are only scraped by the podMonitor

Actual Behavior

  • The metrics server metrics are scraped twice, once because of the podMonitor and once because of the scrape annotations

Steps to Reproduce the Problem

  1. set prometheus.metricServer.enabled: true and prometheus.metricServer.podMonitor.enabled: true

Specifications

  • KEDA Version: Please elaborate
  • Platform & Version: Please elaborate
  • Kubernetes Version: Please elaborate
  • Scaler(s): Please elaborate
@mhowell24 mhowell24 added the bug Something isn't working label May 24, 2022
@tomkerkhove
Copy link
Member

That's a fair ask! Would love to review your PR if you are still OK with it?

@mhowell24
Copy link
Contributor Author

@tomkerkhove no problem have opened #279

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants