diff --git a/README.md b/README.md index 042652b8938d2f858febd6ef44b00e3ec5ace64b..c8afb50b0f2cab4a9590f01f120ddda9326e61f5 100644 --- a/README.md +++ b/README.md @@ -734,8 +734,7 @@ See [exposing Prometheus/Alertmanager/Grafana](docs/exposing-prometheus-alertman ```jsonnet local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + - // ... other necessary mixins ... - (import 'kube-prometheus/blackbox-exporter/blackbox-exporter.libsonnet') + + // ... all necessary mixins ... { _config+:: { // ... configuration for other features ... diff --git a/docs/blackbox-exporter.md b/docs/blackbox-exporter.md index 4c3adb973e382c6f2bec0b80bb8d9cd86d4adc42..cb40fd5f1bdf8943c0e446a2da295804672691c6 100644 --- a/docs/blackbox-exporter.md +++ b/docs/blackbox-exporter.md @@ -4,12 +4,8 @@ The `prometheus-operator` defines a `Probe` resource type that can be used to de ## Adding blackbox exporter manifests to an existing `kube-prometheus` configuration -1. Add the blackbox exporter mixin to the list of imports: -``` -(import 'kube-prometheus/blackbox-exporter/blackbox-exporter.libsonnet') -``` -2. Override blackbox-related configuration parameters as needed. -3. Add the following to the list of renderers to render the blackbox exporter manifests: +1. Override blackbox-related configuration parameters as needed. +2. Add the following to the list of renderers to render the blackbox exporter manifests: ``` { ['blackbox-exporter-' + name]: kp.blackboxExporter[name] for name in std.objectFields(kp.blackboxExporter) } ``` @@ -35,7 +31,6 @@ The `prometheus-operator` defines a `Probe` resource type that can be used to de ```jsonnet local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') + - (import 'kube-prometheus/blackbox-exporter/blackbox-exporter.libsonnet') { _config+:: { namespace: 'monitoring', diff --git a/jsonnet/kube-prometheus/kube-prometheus.libsonnet b/jsonnet/kube-prometheus/kube-prometheus.libsonnet index 3bfd47688a29a2f1913c48218416e2452e476622..38bb061ecfdd61240cf660c9f67c0acf3ad559e6 100644 --- a/jsonnet/kube-prometheus/kube-prometheus.libsonnet +++ b/jsonnet/kube-prometheus/kube-prometheus.libsonnet @@ -5,6 +5,7 @@ local kubeRbacProxyContainer = import './kube-rbac-proxy/container.libsonnet'; (import 'github.com/kubernetes/kube-state-metrics/jsonnet/kube-state-metrics-mixin/mixin.libsonnet') + (import './node-exporter/node-exporter.libsonnet') + (import 'github.com/prometheus/node_exporter/docs/node-mixin/mixin.libsonnet') + +(import './blackbox-exporter/blackbox-exporter.libsonnet') + (import './alertmanager/alertmanager.libsonnet') + (import 'github.com/prometheus/alertmanager/doc/alertmanager-mixin/mixin.libsonnet') + (import 'github.com/prometheus-operator/prometheus-operator/jsonnet/prometheus-operator/prometheus-operator.libsonnet') +