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

Add support for enable_http2 in service monitor, pod monitor and probe #4836

Closed
igorgosh-sap opened this issue Jun 3, 2022 · 6 comments · Fixed by #4889
Closed

Add support for enable_http2 in service monitor, pod monitor and probe #4836

igorgosh-sap opened this issue Jun 3, 2022 · 6 comments · Fixed by #4889

Comments

@igorgosh-sap
Copy link

igorgosh-sap commented Jun 3, 2022

What did you do?
We're trying to upgrade kube-prometheus-stack to version 2.35
We used to build prometheus image with ENV PROMETHEUS_COMMON_DISABLE_HTTP2=1 in previous versions to turn off http2
but it's no longer working. In version 2.35 new parameter was introduced enable_http2 and it's set to true by default

Did you expect to see some different?
We're unable to set enable_http2 to false for service monitors globally or override existing jobs.
It looks like prometheus operator doesn't handle enable_http2 correctly?

Environment

  • Prometheus Operator version:

    v0.56.2

  • Kubernetes version information:

    Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.9", GitCommit:"b631974d68ac5045e076c86a5c66fba6f128dc72", GitTreeState:"clean", BuildDate:"2022-01-19T17:51:12Z", GoVersion:"go1.16.12", Compiler:"gc", Platform:"darwin/amd64"} Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.9", GitCommit:"b631974d68ac5045e076c86a5c66fba6f128dc72", GitTreeState:"clean", BuildDate:"2022-01-19T17:45:53Z", GoVersion:"go1.16.12", Compiler:"gc", Platform:"linux/amd64"}

  • Kubernetes cluster kind:

    insert how you created your cluster: kops, bootkube, etc.

  • Manifests:

insert manifests relevant to the issue
  • Prometheus Operator Logs:
insert Prometheus Operator logs relevant to the issue here

Anything else we need to know?:

@simonpasquier simonpasquier changed the title How to set enable_http2: false in service monitor Add support for enable_http2 in service monitor, pod monitor and probe Jun 7, 2022
@mikechengwei
Copy link
Contributor

/assign

@martin2110
Copy link

martin2110 commented Jun 14, 2022

I ran in to this also, remote_write needs it also.

@johgoe
Copy link
Contributor

johgoe commented Jun 20, 2022

This should be the flag: enable_http2 for the scrape configuration https://github.com/prometheus/prometheus/blob/main/docs/configuration/configuration.md

see: prometheus/prometheus#10492

@simonpasquier
Copy link
Contributor

The solution would be to extend ServiceMonitor, PodMonitor and Probe CRDs with a new enableHTTP2 field. For instance:

apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: example-app
spec:
  selector:
    matchLabels:
      app: example-app
  endpoints:
  - port: web
    enableHTTP2: true

@QuentinBisson
Copy link
Contributor

@simonpasquier this is still an issue for remote write. Should I open another issue ?

@simonpasquier
Copy link
Contributor

@QuentinBisson yes please!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants