From d823b7f74bce2042dc34f0749d3cc5b483f8d341 Mon Sep 17 00:00:00 2001 From: Matthias Loibl <mail@matthiasloibl.com> Date: Thu, 22 Nov 2018 15:28:14 +0100 Subject: [PATCH] contrib/kube-prometheus: Add prometheusURL to adapter's jsonnet config --- .../prometheus-adapter/prometheus-adapter.libsonnet | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jsonnet/kube-prometheus/prometheus-adapter/prometheus-adapter.libsonnet b/jsonnet/kube-prometheus/prometheus-adapter/prometheus-adapter.libsonnet index 16189d39..ac675931 100644 --- a/jsonnet/kube-prometheus/prometheus-adapter/prometheus-adapter.libsonnet +++ b/jsonnet/kube-prometheus/prometheus-adapter/prometheus-adapter.libsonnet @@ -15,6 +15,7 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet'; prometheusAdapter+:: { name: 'prometheus-adapter', labels: { name: $._config.prometheusAdapter.name }, + prometheusURL: 'http://prometheus-' + $._config.prometheus.name + '.' + $._config.namespace + '.svc:9090/', config: ||| resourceRules: cpu: @@ -98,7 +99,7 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet'; '--config=/etc/adapter/config.yaml', '--logtostderr=true', '--metrics-relist-interval=1m', - '--prometheus-url=http://prometheus-' + $._config.prometheus.name + '.' + $._config.namespace + '.svc:9090/', + '--prometheus-url=' + $._config.prometheusAdapter.prometheusURL, '--secure-port=6443', ]) + container.withPorts([{ containerPort: 6443 }]) + -- GitLab