2019-08-20 01:20:17 +02:00
|
|
|
local k = import 'ksonnet/ksonnet.beta.4/k.libsonnet';
|
2019-09-27 00:02:33 +02:00
|
|
|
local utils = import 'utils.libsonnet';
|
2020-03-18 15:13:47 +01:00
|
|
|
local vars = import 'vars.jsonnet';
|
2019-08-20 01:20:17 +02:00
|
|
|
|
|
|
|
{
|
2019-09-27 00:02:33 +02:00
|
|
|
prometheus+:: {
|
2019-08-21 02:46:29 +02:00
|
|
|
kubeControllerManagerPrometheusDiscoveryEndpoints:
|
2019-11-14 16:25:16 +01:00
|
|
|
utils.newEndpoint('kube-controller-manager-prometheus-discovery', 'kube-system', vars.k3s.master_ip, 'http-metrics', 10252),
|
2019-08-21 02:46:29 +02:00
|
|
|
|
|
|
|
kubeSchedulerPrometheusDiscoveryEndpoints:
|
2019-11-14 16:25:16 +01:00
|
|
|
utils.newEndpoint('kube-scheduler-prometheus-discovery', 'kube-system', vars.k3s.master_ip, 'http-metrics', 10251),
|
2019-08-20 01:20:17 +02:00
|
|
|
},
|
|
|
|
|
2020-03-18 15:13:47 +01:00
|
|
|
// Temporary workaround until merge of https://github.com/coreos/kube-prometheus/pull/456
|
2019-08-20 01:20:17 +02:00
|
|
|
kubeStateMetrics+:: {
|
|
|
|
deployment+: {
|
|
|
|
spec+: {
|
|
|
|
template+: {
|
|
|
|
spec+: {
|
|
|
|
containers:
|
2020-03-18 15:13:47 +01:00
|
|
|
std.map(
|
2019-08-20 01:20:17 +02:00
|
|
|
function(c)
|
|
|
|
if std.startsWith(c.name, 'kube-state-metrics') then
|
|
|
|
c {
|
2020-03-18 15:13:47 +01:00
|
|
|
image: $._config.imageRepos.kubeStateMetrics + ':' + $._config.versions.kubeStateMetrics,
|
2019-08-20 01:20:17 +02:00
|
|
|
}
|
|
|
|
else
|
|
|
|
c,
|
|
|
|
super.containers,
|
|
|
|
),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2020-03-18 15:13:47 +01:00
|
|
|
}
|