Open wjentner opened 3 years ago
@wjentner as a workaround I currently add it manually
Dashboard:
local kp = (import 'kube-prometheus/main.libsonnet') +
(import 'kube-prometheus/addons/anti-affinity.libsonnet') +
(import 'kube-prometheus/platforms/kubeadm.libsonnet') +
(import 'kube-prometheus/addons/all-namespaces.libsonnet') +
(import 'kube-prometheus/addons/static-etcd.libsonnet') {
values+:: {
// ...
grafana+:: {
config: {},
rawDashboards+:: {},
dashboards+:: (import 'github.com/etcd-io/etcd/contrib/mixin/mixin.libsonnet').grafanaDashboards,
},
PrometheusRule:
local kp = (import 'kube-prometheus/main.libsonnet') +
(import 'kube-prometheus/addons/anti-affinity.libsonnet') +
(import 'kube-prometheus/platforms/kubeadm.libsonnet') +
(import 'kube-prometheus/addons/all-namespaces.libsonnet') +
(import 'kube-prometheus/addons/static-etcd.libsonnet') {
values+:: {},
// ...
etcd: {
prometheusRule: {
apiVersion: 'monitoring.coreos.com/v1',
kind: 'PrometheusRule',
metadata: {
labels: {
prometheus: 'k8s',
role: 'alert-rules',
},
name: 'etcd-rules',
namespace: $.values.common.namespace,
},
spec+: (import 'github.com/etcd-io/etcd/contrib/mixin/mixin.libsonnet').prometheusAlerts,
},
},
// ...
{ ['etcd-' + name]: kp.etcd[name] for name in std.objectFields(kp.etcd) } +
// ...
This should be partially fixed when https://github.com/prometheus-operator/kube-prometheus/pull/1107 is merged. After that, we can fix part when it is automatically added with etcd addon.
I'll confess interest in this.
What happened?
In previous versions of kube-prometheus, a grafana-dashboard for etcd has been added automatically.
The dashboard is defined here: https://github.com/etcd-io/etcd/blob/master/contrib/mixin/mixin.libsonnet#L236 It is however not included in the compiled YAML.
How to reproduce it (as minimally and precisely as possible):
static-etcd example.