Skip to content

Commit

Permalink
[loki-canary] Add relabelings/metricRelabelings to servicemonitor
Browse files Browse the repository at this point in the history
Signed-off-by: Mitsuru Kariya <[email protected]>
  • Loading branch information
kariya-mitsuru committed Feb 6, 2024
1 parent 06500b7 commit 2815c0a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/loki-canary/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: loki-canary
description: Helm chart for Grafana Loki Canary
type: application
appVersion: 2.9.1
version: 0.14.0
version: 0.14.1
home: https://github.com/grafana/helm-charts
sources:
- https://github.com/grafana/loki
Expand Down
4 changes: 3 additions & 1 deletion charts/loki-canary/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# loki-canary

![Version: 0.14.0](https://img.shields.io/badge/Version-0.14.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.9.1](https://img.shields.io/badge/AppVersion-2.9.1-informational?style=flat-square)
![Version: 0.14.1](https://img.shields.io/badge/Version-0.14.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.9.1](https://img.shields.io/badge/AppVersion-2.9.1-informational?style=flat-square)

Helm chart for Grafana Loki Canary

Expand Down Expand Up @@ -57,7 +57,9 @@ helm repo add grafana https://grafana.github.io/helm-charts
| serviceMonitor.enabled | bool | `false` | If enabled, ServiceMonitor resources for Prometheus Operator are created |
| serviceMonitor.interval | string | `nil` | ServiceMonitor scrape interval |
| serviceMonitor.labels | object | `{}` | Additional ServiceMonitor labels |
| serviceMonitor.metricRelabelings | list | `[]` | ServiceMonitor metric relabel configs to apply to samples before ingestion https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#endpoint |
| serviceMonitor.namespace | string | `nil` | Alternative namespace for ServiceMonitor resources |
| serviceMonitor.namespaceSelector | object | `{}` | Namespace selector for ServiceMonitor resources |
| serviceMonitor.relabelings | list | `[]` | ServiceMonitor relabel configs to apply to samples before scraping https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#endpoint |
| serviceMonitor.scrapeTimeout | string | `nil` | ServiceMonitor scrape timeout in Go duration format (e.g. 15s) |
| tolerations | list | `[]` | Tolerations for canary pods |
8 changes: 8 additions & 0 deletions charts/loki-canary/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,13 @@ spec:
{{- with .scrapeTimeout }}
scrapeTimeout: {{ . }}
{{- end }}
{{- with .relabelings }}
relabelings:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .metricRelabelings }}
metricRelabelings:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
6 changes: 6 additions & 0 deletions charts/loki-canary/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ serviceMonitor:
interval: null
# -- ServiceMonitor scrape timeout in Go duration format (e.g. 15s)
scrapeTimeout: null
# -- ServiceMonitor relabel configs to apply to samples before scraping
# https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#endpoint
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: []

# -- Additional CLI args for the canary
extraArgs:
Expand Down

0 comments on commit 2815c0a

Please sign in to comment.