helm-charts icon indicating copy to clipboard operation
helm-charts copied to clipboard

[prometheus-kube-stack] Default prometheus datasource url not working with http_proxy

Open r10r opened this issue 2 years ago • 2 comments

Describe the bug a clear and concise description of what the bug is.

Hi devs,

The default prometheus datasource does not work when I install the prometheus-kube-stack chart with a http proxy set in the grafana environment.

What's your helm version?

version.BuildInfo{Version:"v3.6.1", GitCommit:"61d8e8c4a6f95540c15c6a65f36a6dd0a45e7a2f", GitTreeState:"clean", GoVersion:"go1.16.5"}

What's your kubectl version?

Client Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.7", GitCommit:"132a687512d7fb058d0f5890f07d4121b3f0a2e2", GitTreeState:"clean", BuildDate:"2021-05-12T12:40:09Z", GoVersion:"go1.15.12", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.14", GitCommit:"0f77da5bd4809927e15d1658fb4aa8f13ad890a5", GitTreeState:"clean", BuildDate:"2022-06-15T14:11:36Z", GoVersion:"go1.16.15", Compiler:"gc", Platform:"linux/amd64"}

Which chart?

kube-prometheus-stack

What's the chart version?

36.2.1

What happened?

Grafana tries to connect to the default prometheus datasource using the configured http proxy.

What you expected to happen?

Grafana should connect to the default prometheus datasource succesfully without using the proxy.

How to reproduce it?

Start the grafana chart with the following environment variables set:

http_proxy="http://proxy.example.com"
https_proxy="http://proxy.example.com"
no_proxy="10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,127.0.0.0/8,localhost,100.64.0.0/10,.svc,.local,.example.com"

Enter the changed values of values.yaml?

NONE

Enter the command that you execute and failing/misfunctioning.

See above.

Anything else we need to know?

I had to overwrite the value grafana.sidecar.datasources.url to make the default prometheus datasource work. The domain must end with .svc (or the cluster domain) otherwise you can't exclude the domain in the no_proxy environment variable.

What about changing the default URL generated by the template ?

I did this by example here https://github.com/r10r/helm-charts/commit/649a79ceab1c0ecdcf49f0d0219b95df99e29bd3

r10r avatar Jul 04 '22 21:07 r10r

I'm also having the same problem, and I don't think excluding the domain in no_proxy EV will work according to this.

opethema avatar Aug 09 '22 14:08 opethema

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Any further update will cause the issue/pull request to no longer be considered stale. Thank you for your contributions.

stale[bot] avatar Sep 16 '22 01:09 stale[bot]

This issue is being automatically closed due to inactivity.

stale[bot] avatar Oct 12 '22 10:10 stale[bot]

\remove-lifecycle stale Please reopen if this is not already fixed.

r10r avatar Oct 12 '22 12:10 r10r