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

GZIP encoding broken in 2.8.0+ with Prometheus #2036

Closed
der-eismann opened this issue Mar 27, 2023 · 4 comments · Fixed by #2037
Closed

GZIP encoding broken in 2.8.0+ with Prometheus #2036

der-eismann opened this issue Mar 27, 2023 · 4 comments · Fixed by #2037
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@der-eismann
Copy link
Contributor

der-eismann commented Mar 27, 2023

What happened: We upgraded kube-state-metrics from 2.7.0 to 2.8.0. Afterwards Prometheus couldn't scrape it with the error being gzip: invalid checksum. Sounds similar to #1371.

What you expected to happen: kube-state-metrics should continue to be scraped as usual.

How to reproduce it (as minimally and precisely as possible):

  • Start kube-state-metrics v2.8.0 with --enable-gzip-encoding
  • Let it be scraped by Prometheus

Anything else we need to know?: Weirdly it works fine if I request the endpoint via curl & gunzip like

$ curl http://kube-state-metrics.kube-system.svc:8080/metrics -v  -H 'Accept-encoding: gzip' | gunzip -

Maybe the changed headers in #1974 are causing some complications?

Environment:

  • kube-state-metrics version: 2.8.0 (2.8.2 affected as well)
  • Kubernetes version (use kubectl version): 1.25.8
  • Cloud provider or hardware configuration: AWS EC2
@der-eismann der-eismann added the kind/bug Categorizes issue or PR as related to a bug. label Mar 27, 2023
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Mar 27, 2023
@mrueg
Copy link
Member

mrueg commented Mar 27, 2023

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 27, 2023
@mrueg mrueg self-assigned this Mar 27, 2023
mrueg added a commit to mrueg/kube-state-metrics that referenced this issue Mar 27, 2023
Fixes kubernetes#2036

Signed-off-by: Manuel Rüger <manuel@rueg.eu>
@mrueg
Copy link
Member

mrueg commented Mar 27, 2023

Can you test #2037 and see if this fixes the issue?

@der-eismann
Copy link
Contributor Author

Works fine 🙂 After building & running the container, the Prometheus scraping works again & curl also still works. Thanks for the quick fix!

@mrueg
Copy link
Member

mrueg commented Mar 27, 2023

Thanks for testing and the quick turnaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants