Skip to content
Snippets Groups Projects
Commit dc77f255 authored by Benoît Knecht's avatar Benoît Knecht
Browse files

prometheus: Let name and replicas be set in _config

Before #260, the Prometheus name and number of replicas could be
configured in `_config.prometheus.name` and
`_config.prometheus.replicas` respectively.

It isn't the case anymore, which means that configurations that did set
a custom name for Prometheus will get a second Prometheus instance
called `k8s` when they upgrade kube-prometheus.

This commit adds back the ability to configure both of these parameters
in `_config`.
parent a7884a6c
Branches
Tags
No related merge requests found
......@@ -18,6 +18,8 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
},
prometheus+:: {
name: 'k8s',
replicas: 2,
rules: {},
namespaces: ['default', 'kube-system', $._config.namespace],
},
......@@ -26,10 +28,10 @@ local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
prometheus+:: {
local p = self,
name:: 'k8s',
name:: $._config.prometheus.name,
namespace:: $._config.namespace,
roleBindingNamespaces:: $._config.prometheus.namespaces,
replicas:: 2,
replicas:: $._config.prometheus.replicas,
prometheusRules:: $._config.prometheus.rules,
alertmanagerName:: $.alertmanager.service.metadata.name,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment