From 170296603a1297f09d51aadeaa018314820c00f2 Mon Sep 17 00:00:00 2001 From: Derek Wilson <nosliwkeredj@gmail.com> Date: Wed, 28 Oct 2020 02:57:36 +0000 Subject: [PATCH] add prometheus adapter ns to custom metrics becauase otherwise these will be in different places --- .../kube-prometheus-custom-metrics.libsonnet | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/jsonnet/kube-prometheus/kube-prometheus-custom-metrics.libsonnet b/jsonnet/kube-prometheus/kube-prometheus-custom-metrics.libsonnet index 110ace44..b0240ec3 100644 --- a/jsonnet/kube-prometheus/kube-prometheus-custom-metrics.libsonnet +++ b/jsonnet/kube-prometheus/kube-prometheus-custom-metrics.libsonnet @@ -4,6 +4,7 @@ { _config+:: { prometheusAdapter+:: { + namespace: $._config.namespace, // Rules for custom-metrics config+:: { rules+: [ @@ -87,7 +88,7 @@ spec: { service: { name: $.prometheusAdapter.service.metadata.name, - namespace: $._config.namespace, + namespace: $._config.prometheusAdapter.namespace, }, group: 'custom.metrics.k8s.io', version: 'v1beta1', @@ -105,7 +106,7 @@ spec: { service: { name: $.prometheusAdapter.service.metadata.name, - namespace: $._config.namespace, + namespace: $._config.prometheusAdapter.namespace, }, group: 'custom.metrics.k8s.io', version: 'v1beta2', @@ -141,7 +142,7 @@ subjects: [{ kind: 'ServiceAccount', name: $.prometheusAdapter.serviceAccount.metadata.name, - namespace: $._config.namespace, + namespace: $._config.prometheusAdapter.namespace, }], }, customMetricsClusterRoleBindingHPA: { -- GitLab