diff --git a/jsonnet/kube-prometheus/prometheus/prometheus.libsonnet b/jsonnet/kube-prometheus/prometheus/prometheus.libsonnet index d0ce82c2d8493d94aa3cce75aef2486aa7db2692..8d19c4563b05f065bc7bc9b30b588dc60850c8d8 100644 --- a/jsonnet/kube-prometheus/prometheus/prometheus.libsonnet +++ b/jsonnet/kube-prometheus/prometheus/prometheus.libsonnet @@ -40,7 +40,7 @@ local k = import 'ksonnet/ksonnet.beta.3/k.libsonnet'; service.new('prometheus-' + $._config.prometheus.name, { app: 'prometheus', prometheus: $._config.prometheus.name }, prometheusPort) + service.mixin.metadata.withNamespace($._config.namespace) + service.mixin.metadata.withLabels({ prometheus: $._config.prometheus.name }), - [if $._config.prometheus.rules != null and $._config.prometheus.rules != {} then "rules"]: + [if $._config.prometheus.rules != null && $._config.prometheus.rules != {} then "rules"]: { apiVersion: 'monitoring.coreos.com/v1', kind: 'PrometheusRule',