linkerd2 icon indicating copy to clipboard operation
linkerd2 copied to clipboard

hearthbeat cj prometheus url hardcoded

Open michalschott opened this issue 2 years ago • 4 comments

What is the issue?

Using own prometheus instance, especially in different namespace - hearthbeat fails due to hardcoded url in helm chart - https://github.com/linkerd/linkerd2/blob/main/charts/linkerd-control-plane/templates/heartbeat.yaml#L63

How can it be reproduced?

Follow "Bring your own prometheus" guide and run hearthbeat cj

Logs, error output, etc

N/

output of linkerd check -o short

time="2022-09-08T12:06:02Z" level=error msg="Prometheus query failed: Post \"http://prometheus.linkerd-viz.svc.cluster.local:9090/api/v1/query\": dial tcp: lookup prometheus.linkerd-viz.svc.cluster.local on 172.20.0.10:53: no such host"

Environment

All

Possible solution

Allow to pass prometheus url as a variable

Additional context

No response

Would you like to work on fixing this bug?

maybe

michalschott avatar Sep 08 '22 12:09 michalschott

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 08 '22 17:12 stale[bot]

I stumbled across this as well. We have an own prometheus installation and install the linkerd-control-plane using helm. If the heartbeat job is enabled (default) all jobs fail because of the hardcoded url:

 args:
            - "heartbeat"
            ...
            - "-prometheus-url=http://prometheus.linkerd-viz.svc.{{.Values.clusterDomain}}:9090"

The only solution is to disable the heartbeat job. Shouldn't be to hard to make the url configurable (e.g. by a value prometheusUrl as proposed here: https://github.com/linkerd/linkerd2/pull/9446 ) or remove the heartbeat job completely and put it into the linkerd-viz chart. (as proposed here: https://github.com/linkerd/linkerd2/issues/7586 )

Just ignoring this does not feel right. But being new to Linkerd maybe I am wrong

patst avatar Dec 13 '22 12:12 patst

Hi, could I take this issue?

douglaslim avatar Apr 27 '23 15:04 douglaslim

Hey, could i take up this issue?

bharateshwq avatar Jun 20 '24 01:06 bharateshwq