Skip to content

Commit 6c0bcc4

Browse files
fix jsonnet error with kube-prometheus >= v0.8 (lensapp#5687)
* fix jsonnet error with kube-prometheus > v0.8 kubelet ServiceMonitor moved to kubernetesControlPlane starting from v0.8 Signed-off-by: elvis chan <[email protected]> * Add not in custom-prometheuus.md about jsonnet version Signed-off-by: Sebastian Malton <[email protected]> Signed-off-by: elvis chan <[email protected]> Signed-off-by: Sebastian Malton <[email protected]> Co-authored-by: Sebastian Malton <[email protected]>
1 parent 4491eb1 commit 6c0bcc4

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

jsonnet/lens/custom-prometheus.jsonnet

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
},
2626
},
27-
prometheus+:: {
27+
kubernetesControlPlane+:: {
2828
serviceMonitorKubelet+: {
2929
spec+: {
3030
endpoints: std.map(function(endpoint)

troubleshooting/custom-prometheus.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,15 @@ metricRelabelings:
3131

3232
### Jsonnet
3333

34-
The required label replacements are bundled in [jsonnet/lens/custom-prometheus](../jsonnet/lens/custom-prometheus.jsonnet). To install it copy the file or use
35-
[Jsonnet Bundler](https://github.com/jsonnet-bundler/jsonnet-bundler).
34+
The required label replacements are bundled in [jsonnet/lens/custom-prometheus](../jsonnet/lens/custom-prometheus.jsonnet).
35+
This file is currently for jsonnet versions >= 0.8.0
36+
To install it copy the file or use [Jsonnet Bundler](https://github.com/jsonnet-bundler/jsonnet-bundler).
3637

3738
```bash
3839
jb init && jb install https://github.com/lensapp/lens/jsonnet/lens@master
3940
```
4041

41-
When the installation was successful include it into your definitions. Using the [example](https://github.com/coreos/kube-prometheus#compiling)
42+
When the installation was successful include it into your definitions. Using the [example](https://github.com/coreos/kube-prometheus#compiling)
4243
of kube-prometheus, e.g.:
4344

4445
```
@@ -60,4 +61,3 @@ local kp =
6061
```
6162
helm upgrade --set server.global.scrape_interval=30s prometheus stable/prometheus
6263
```
63-

0 commit comments

Comments
 (0)