1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

fix jsonnet error with kube-prometheus >= v0.8 (#5687)

* fix jsonnet error with kube-prometheus > v0.8

kubelet ServiceMonitor moved to kubernetesControlPlane starting from v0.8

Signed-off-by: elvis chan <78713260+elvischan-crypto@users.noreply.github.com>

* Add not in custom-prometheuus.md about jsonnet version

Signed-off-by: Sebastian Malton <sebastian@malton.name>

Signed-off-by: elvis chan <78713260+elvischan-crypto@users.noreply.github.com>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Co-authored-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
elvis chan 2022-10-19 15:17:07 +01:00 committed by GitHub
parent 4491eb12d7
commit 6c0bcc403b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -24,7 +24,7 @@
}, },
}, },
}, },
prometheus+:: { kubernetesControlPlane+:: {
serviceMonitorKubelet+: { serviceMonitorKubelet+: {
spec+: { spec+: {
endpoints: std.map(function(endpoint) endpoints: std.map(function(endpoint)

View File

@ -31,8 +31,9 @@ metricRelabelings:
### Jsonnet ### Jsonnet
The required label replacements are bundled in [jsonnet/lens/custom-prometheus](../jsonnet/lens/custom-prometheus.jsonnet). To install it copy the file or use The required label replacements are bundled in [jsonnet/lens/custom-prometheus](../jsonnet/lens/custom-prometheus.jsonnet).
[Jsonnet Bundler](https://github.com/jsonnet-bundler/jsonnet-bundler). This file is currently for jsonnet versions >= 0.8.0
To install it copy the file or use [Jsonnet Bundler](https://github.com/jsonnet-bundler/jsonnet-bundler).
```bash ```bash
jb init && jb install https://github.com/lensapp/lens/jsonnet/lens@master jb init && jb install https://github.com/lensapp/lens/jsonnet/lens@master
@ -60,4 +61,3 @@ local kp =
``` ```
helm upgrade --set server.global.scrape_interval=30s prometheus stable/prometheus helm upgrade --set server.global.scrape_interval=30s prometheus stable/prometheus
``` ```