Skip to content

Commit

Permalink
Merge pull request #43 from GeorgianaElena/doc-additional-labels
Browse files Browse the repository at this point in the history
Document changes needed for prometheus prior 14.* but also newer
  • Loading branch information
GeorgianaElena authored Jul 1, 2022
2 parents a22e4ef + 25d43bf commit 8b639c8
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,28 @@ a couple of dashboards to it.
**NOTE: ANY CHANGES YOU MAKE VIA THE GRAFANA UI WILL BE OVERWRITTEN NEXT TIME YOU RUN deploy.bash.
TO MAKE CHANGES, EDIT THE JSONNET FILE AND DEPLOY AGAIN**
### Prometheus chart version 14.* or newer
If you are using a [prometheus chart](https://github.com/prometheus-community/helm-charts) of a version later than `13.*`, then additional configuration for `kube-state-metrics` needs to be provided because [`v2.0` of the`kube-state-metrics` chart](https://kubernetes.io/blog/2021/04/13/kube-state-metrics-v-2-0/) that comes with latest prometheus doesn't add any labels by default.
Since these dashboards assume the existence of such labels for pods or nodes, we need to explicitly configure prometheus to track them by populating the list at [prometheus.kubeStateMetrics.metricLabelsAllowlist](https://github.com/prometheus-community/helm-charts/blob/47d3b08e980cd0862e28f7d7f49c07dd7b9b7091/charts/kube-state-metrics/values.yaml#L152).
```yaml
prometheus:
kube-state-metrics:
metricLabelsAllowlist:
# to select jupyterhub component pods and get the hub usernames
- pods=[app,component,hub.jupyter.org/username]
# allowing all labels is probably fine for nodes, since they don't churn much, unlike pods
- nodes[*]
```
### Prometheus older than 14.*
If you're using a prometheus chart older than version `14.*`, then you can deploy the dashboards available prior to the upgrade, in the [`1.0 tag`](https://github.com/jupyterhub/grafana-dashboards/releases/tag/1.0).
## Upgrading grafonnet version
The grafonnet jsonnet library is bundled here with [jsonnet-bundler](https://github.com/jsonnet-bundler/jsonnet-bundler).
Expand Down

0 comments on commit 8b639c8

Please sign in to comment.