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

[kube-prometheus-stack] Added fallbackScrapeProtocol option to additionalServiceMonitors and additionalPodMonitors #5108

Conversation

chazapp
Copy link
Contributor

@chazapp chazapp commented Jan 2, 2025

What this PR does / why we need it

Prometheus v3 Migration Guide :

Prometheus v3 is more strict concerning the Content-Type header received when scraping. Prometheus v2 would default to the standard Prometheus text protocol if the target being scraped did not specify a Content-Type header or if the header was unparsable or unrecognised. This could lead to incorrect data being parsed in the scrape. Prometheus v3 will now fail the scrape in such cases.
If a scrape target is not providing the correct Content-Type header the fallback protocol can be specified using the fallback_scrape_protocol parameter. See Prometheus scrape_config documentation.

This merge requests allows users of the additionalServiceMonitors and additionalPodMonitors configurations to set the fallbackScrapeProtocol for their ServiceMonitor and PodMonitor specs.

Which issue this PR fixes

(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

Special notes for your reviewer

Checklist

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [prometheus-couchdb-exporter])

@chazapp chazapp changed the title [kube-prometheus-stack] #5104 Added fallbackScrapeProtocol option to additionalServiceMonitors and additionalPodMonitors [kube-prometheus-stack] Added fallbackScrapeProtocol option to additionalServiceMonitors and additionalPodMonitors Jan 2, 2025
@chazapp chazapp closed this Jan 2, 2025
@chazapp chazapp reopened this Jan 2, 2025
jkroepke
jkroepke previously approved these changes Jan 3, 2025
Copy link
Member

@jkroepke jkroepke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM

@jkroepke
Copy link
Member

jkroepke commented Jan 3, 2025

PLease bump the chart version!

duncaan and others added 5 commits January 3, 2025 10:11
)

* [prometheus-push-gateway] Add lifecycle hooks

Fixes prometheus-community#5102

Add support for lifecycle hooks in the push-gateway deployment.

* Add lifecycle hooks configuration to `charts/prometheus-pushgateway/templates/deployment.yaml`
* Add lifecycle hooks configuration to `charts/prometheus-pushgateway/templates/statefulset.yaml`
* Add lifecycle hooks configuration options in `charts/prometheus-pushgateway/values.yaml`

Signed-off-by: Duncan Schulze <[email protected]>

* address comments
Signed-off-by: Duncan Schulze <[email protected]>

* Correct placement of lifecycle

Signed-off-by: zeritti <[email protected]>

* Add CI test cases

Signed-off-by: zeritti <[email protected]>

---------

Signed-off-by: Duncan Schulze <[email protected]>
Signed-off-by: zeritti <[email protected]>
Co-authored-by: zeritti <[email protected]>
Signed-off-by: Alexandre Joris <[email protected]>
…eProtocol option to additionalServiceMonitors and additionalPodMonitors

Signed-off-by: Alexandre Joris <[email protected]>
Signed-off-by: Alexandre Joris <[email protected]>
Signed-off-by: Alexandre Joris <[email protected]>
@chazapp chazapp force-pushed the fallback-scrape-protocol-for-additional branch from ff456a8 to d9c7052 Compare January 3, 2025 09:11
@chazapp chazapp requested a review from zeritti as a code owner January 3, 2025 09:11
@chazapp
Copy link
Contributor Author

chazapp commented Jan 3, 2025

@jkroepke bumped chart to v67.7.0 !

@chazapp chazapp requested a review from jkroepke January 3, 2025 09:15
@jkroepke jkroepke merged commit c8834dd into prometheus-community:main Jan 3, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants