From 7564dde9c17b268ed74d6aa8f59a381bd10adabb Mon Sep 17 00:00:00 2001 From: Suraj Deshmukh Date: Mon, 9 Nov 2020 18:42:56 +0530 Subject: [PATCH] linkerd: Disable inbuilt prometheus and grafana - Add new variable `prometheus_url` where user can provide the link to the external prometheus from where linkerd can scrape the metrics. Signed-off-by: Suraj Deshmukh --- pkg/components/linkerd/component.go | 5 +++-- pkg/components/linkerd/manifest.go | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pkg/components/linkerd/component.go b/pkg/components/linkerd/component.go index f71f2b2f1..5b6e04055 100644 --- a/pkg/components/linkerd/component.go +++ b/pkg/components/linkerd/component.go @@ -41,8 +41,9 @@ func init() { } type component struct { - ControllerReplicas int `hcl:"controller_replicas,optional"` - EnableMonitoring bool `hcl:"enable_monitoring,optional"` + ControllerReplicas int `hcl:"controller_replicas,optional"` + EnableMonitoring bool `hcl:"enable_monitoring,optional"` + PrometheusURL string `hcl:"prometheus_url,optional"` Cert cert } diff --git a/pkg/components/linkerd/manifest.go b/pkg/components/linkerd/manifest.go index 34eb0a433..1a7877f71 100644 --- a/pkg/components/linkerd/manifest.go +++ b/pkg/components/linkerd/manifest.go @@ -18,6 +18,7 @@ package linkerd const chartValuesTmpl = ` enableMonitoring: {{.EnableMonitoring}} global: + prometheusUrl: {{ .PrometheusURL }} identityTrustAnchorsPEM: | {{ .Cert.CA }} @@ -30,6 +31,12 @@ identity: keyPEM: | {{ .Cert.Key }} +prometheus: + enabled: false + +grafana: + enabled: false + # controller configuration controllerReplicas: {{.ControllerReplicas}} `