Helm: support metricRelabelings for loki serviceMonitors (#9784)

**What this PR does / why we need it**:

Add support for `metricRelabelings` in the `ServiceMonitor` resources
when monitoring Loki.

**Checklist**
- [x] Reviewed the
[`CONTRIBUTING.md`](https://github.com/grafana/loki/blob/main/CONTRIBUTING.md)
guide (**required**)
- [x] Documentation added
- [ ] Tests updated
- [x] `CHANGELOG.md` updated
- [ ] If the change is worth mentioning in the release notes, add
`add-to-release-notes` label
- [ ] Changes that require user attention or interaction to upgrade are
documented in `docs/sources/upgrading/_index.md`
- [x] For Helm chart changes bump the Helm chart version in
`production/helm/loki/Chart.yaml` and update
`production/helm/loki/CHANGELOG.md` and
`production/helm/loki/README.md`. [Example
PR](d10549e3ec)

---------

Signed-off-by: Tiago Posse <tiagoposse@gmail.com>
Co-authored-by: Tiago Posse <tiago.posse@hi.health>
pull/9803/head^2 helm-loki-5.8.6
Tiago Posse 3 years ago committed by GitHub
parent 15538ac4fc
commit a24ef7b206
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      docs/sources/installation/helm/reference.md
  2. 4
      production/helm/loki/CHANGELOG.md
  3. 2
      production/helm/loki/Chart.yaml
  4. 2
      production/helm/loki/README.md
  5. 4
      production/helm/loki/templates/monitoring/servicemonitor.yaml
  6. 7
      production/helm/loki/values.yaml

@ -2706,6 +2706,15 @@ true
<td><pre lang="json">
{}
</pre>
</td>
</tr>
<tr>
<td>monitoring.serviceMonitor.metricRelabelings</td>
<td>list</td>
<td>ServiceMonitor metric relabel configs to apply to samples before ingestion https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#endpoint</td>
<td><pre lang="json">
[]
</pre>
</td>
</tr>
<tr>

@ -12,6 +12,10 @@ Entries should be ordered as follows:
Entries should include a reference to the pull request that introduced the change.
[//]: # (<AUTOMATED_UPDATES_LOCATOR> : do not remove this line. This locator is used by the CI pipeline to automatically create a changelog entry for each new Loki release. Add other chart versions and respective changelog entries bellow this line.)
## 5.8.6
- [ENHANCEMENT] Add serviceMonitor.metricRelabelings to support metric relabelings
## 5.8.4
- [ENHANCEMENT] Add loki.lokiCanary.updateStrategy configuration

@ -3,7 +3,7 @@ name: loki
description: Helm chart for Grafana Loki in simple, scalable mode
type: application
appVersion: 2.8.2
version: 5.8.5
version: 5.8.6
home: https://grafana.github.io/helm-charts
sources:
- https://github.com/grafana/loki

@ -1,6 +1,6 @@
# loki
![Version: 5.8.5](https://img.shields.io/badge/Version-5.8.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.8.2](https://img.shields.io/badge/AppVersion-2.8.2-informational?style=flat-square)
![Version: 5.8.6](https://img.shields.io/badge/Version-5.8.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.8.2](https://img.shields.io/badge/AppVersion-2.8.2-informational?style=flat-square)
Helm chart for Grafana Loki in simple, scalable mode

@ -45,6 +45,10 @@ spec:
{{- with .relabelings }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .metricRelabelings }}
metricRelabelings:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .scheme }}
scheme: {{ . }}
{{- end }}

@ -570,6 +570,9 @@ monitoring:
# -- ServiceMonitor relabel configs to apply to samples before scraping
# https://github.com/prometheus-operator/prometheus-operator/blob/master/Documentation/api.md#relabelconfig
relabelings: []
# -- ServiceMonitor metric relabel configs to apply to samples before ingestion
# https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#endpoint
metricRelabelings: []
# -- ServiceMonitor will use http by default, but you can pick https as well
scheme: http
# -- ServiceMonitor will use these tlsConfig settings to make the health check requests
@ -1176,8 +1179,8 @@ gateway:
targetCPUUtilizationPercentage: 60
# -- Target memory utilisation percentage for the gateway
targetMemoryUtilizationPercentage:
# -- See `kubectl explain deployment.spec.strategy` for more
# -- ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
# -- See `kubectl explain deployment.spec.strategy` for more
# -- ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
# -- Behavior policies while scaling.
behavior: {}
# scaleUp:

Loading…
Cancel
Save