From b1c674100bed7a77fd1556507e9762e515651a23 Mon Sep 17 00:00:00 2001 From: Matthias Loibl <mail@matthiasloibl.com> Date: Fri, 7 Jun 2019 15:19:30 +0200 Subject: [PATCH] Add commented imports for most common patches to example.jsonnet --- README.md | 9 ++++++++- ...developing-prometheus-rules-and-grafana-dashboards.md | 9 ++++++++- example.jsonnet | 9 ++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fd6cd966..4c65a569 100644 --- a/README.md +++ b/README.md @@ -160,7 +160,14 @@ Here's [example.jsonnet](example.jsonnet): [embedmd]:# (example.jsonnet) ```jsonnet local kp = - (import 'kube-prometheus/kube-prometheus.libsonnet') + { + (import 'kube-prometheus/kube-prometheus.libsonnet') + + // Uncomment the following imports to enable its patches + // (import 'kube-prometheus/kube-prometheus-anti-affinity.libsonnet') + + // (import 'kube-prometheus/kube-prometheus-managed-cluster.libsonnet') + + // (import 'kube-prometheus/kube-prometheus-node-ports.libsonnet') + + // (import 'kube-prometheus/kube-prometheus-static-etcd.libsonnet') + + // (import 'kube-prometheus/kube-prometheus-thanos.libsonnet') + + { _config+:: { namespace: 'monitoring', }, diff --git a/docs/developing-prometheus-rules-and-grafana-dashboards.md b/docs/developing-prometheus-rules-and-grafana-dashboards.md index 0635f992..92ef040b 100644 --- a/docs/developing-prometheus-rules-and-grafana-dashboards.md +++ b/docs/developing-prometheus-rules-and-grafana-dashboards.md @@ -11,7 +11,14 @@ As a basis, all examples in this guide are based on the base example of the kube [embedmd]:# (../example.jsonnet) ```jsonnet local kp = - (import 'kube-prometheus/kube-prometheus.libsonnet') + { + (import 'kube-prometheus/kube-prometheus.libsonnet') + + // Uncomment the following imports to enable its patches + // (import 'kube-prometheus/kube-prometheus-anti-affinity.libsonnet') + + // (import 'kube-prometheus/kube-prometheus-managed-cluster.libsonnet') + + // (import 'kube-prometheus/kube-prometheus-node-ports.libsonnet') + + // (import 'kube-prometheus/kube-prometheus-static-etcd.libsonnet') + + // (import 'kube-prometheus/kube-prometheus-thanos.libsonnet') + + { _config+:: { namespace: 'monitoring', }, diff --git a/example.jsonnet b/example.jsonnet index fcd2bb01..e50e3395 100644 --- a/example.jsonnet +++ b/example.jsonnet @@ -1,5 +1,12 @@ local kp = - (import 'kube-prometheus/kube-prometheus.libsonnet') + { + (import 'kube-prometheus/kube-prometheus.libsonnet') + + // Uncomment the following imports to enable its patches + // (import 'kube-prometheus/kube-prometheus-anti-affinity.libsonnet') + + // (import 'kube-prometheus/kube-prometheus-managed-cluster.libsonnet') + + // (import 'kube-prometheus/kube-prometheus-node-ports.libsonnet') + + // (import 'kube-prometheus/kube-prometheus-static-etcd.libsonnet') + + // (import 'kube-prometheus/kube-prometheus-thanos.libsonnet') + + { _config+:: { namespace: 'monitoring', }, -- GitLab