Skip to content

Commit 6de4158

Browse files
authored
Templating prometheus url into cronjob heartbeat (#11343)
Can not use external prometheus with hearbeat. This change adds a new variable `.prometheusUrl` in value and use it into heartbeat from linkerd-control-plane chart. Fixes #11342 Signed-off-by: David ALEXANDRE <[email protected]>
1 parent 4d152f1 commit 6de4158

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

charts/linkerd-control-plane/templates/heartbeat.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ spec:
6464
- "-controller-namespace={{.Release.Namespace}}"
6565
- "-log-level={{.Values.controllerLogLevel}}"
6666
- "-log-format={{.Values.controllerLogFormat}}"
67+
{{- if .Values.prometheusUrl }}
68+
- "-prometheus-url={{.Values.prometheusUrl}}"
69+
{{- else }}
6770
- "-prometheus-url=http://prometheus.linkerd-viz.svc.{{.Values.clusterDomain}}:9090"
71+
{{- end }}
6872
{{- if .Values.heartbeatResources -}}
6973
{{- include "partials.resources" .Values.heartbeatResources | nindent 12 }}
7074
{{- end }}

charts/linkerd-control-plane/values.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ policyValidator:
502502
# for more information.
503503
injectCaFromSecret: ""
504504

505-
# -|- CPU, Memory and Ephemeral Storage resources required by the policy controller
505+
# -|- CPU, Memory and Ephemeral Storage resources required by the policy controller
506506
#policyControllerResources:
507507

508508
# -- NodeSelector section, See the [K8S
@@ -525,6 +525,9 @@ nodeSelector:
525525
# for more information
526526
#nodeAffinity:
527527

528+
# -- url of external prometheus instance (used for the heartbeat)
529+
prometheusUrl: ""
530+
528531
# Prometheus Operator PodMonitor configuration
529532
podMonitor:
530533
# -- Enables the creation of Prometheus Operator [PodMonitor](https://prometheus-operator.dev/docs/operator/api/#monitoring.coreos.com/v1.PodMonitor)

0 commit comments

Comments
 (0)