mirror of
https://github.com/bitnami/charts.git
synced 2026-02-13 06:27:12 +08:00
[bitnami/thanos] Add Prometheus alerts for Thanos components (#6776)
* [bitnami/thanos] Add Prometheus alerts for Thanos components * Revert "[bitnami/thanos] Add Prometheus alerts for Thanos components" * [bitnami/thanos] Add Prometheus alerts for Thanos components * Bump chart version * Set up empty the default namespace value and include additionalLabels * Include additionalLabels and delete default namespace value * Remove whitespaces * Bump minor version instead of patch version. Co-authored-by: Francois Minaud <fminaud@wiremind.io> Co-authored-by: alvneiayu <alvaron@vmware.com>
This commit is contained in:
@@ -28,4 +28,4 @@ name: thanos
|
||||
sources:
|
||||
- https://github.com/bitnami/bitnami-docker-thanos
|
||||
- https://thanos.io
|
||||
version: 5.1.1
|
||||
version: 5.2.0
|
||||
|
||||
@@ -646,6 +646,11 @@ The following tables lists the configurable parameters of the Thanos chart and t
|
||||
| `metrics.serviceMonitor.labels` | Additional labels for ServiceMonitor | `{}` |
|
||||
| `metrics.serviceMonitor.interval` | Interval at which metrics should be scraped. | `nil` (Prometheus Operator default value) |
|
||||
| `metrics.serviceMonitor.scrapeTimeout` | Timeout after which the scrape is ended | `nil` (Prometheus Operator default value) |
|
||||
| `metrics.prometheusRule.enabled` | if `true`, creates a Prometheus Operator PrometheusRule (also requires `metrics.enabled` to be `true`) | `false` |
|
||||
| `metrics.prometheusRule.namespace` | Namespace in which the PrometheusRule will be created | `nil` |
|
||||
| `metrics.prometheusRule.additionalLabels` | Additional labels for the prometheusRule | `{}` |
|
||||
| `metrics.prometheusRule.rules` | Prometheus Rules for Thanos components | |
|
||||
|
||||
|
||||
### Volume Permissions parameters
|
||||
|
||||
|
||||
23
bitnami/thanos/templates/prometheusrule.yaml
Normal file
23
bitnami/thanos/templates/prometheusrule.yaml
Normal file
@@ -0,0 +1,23 @@
|
||||
{{- if and .Values.metrics.enabled .Values.metrics.prometheusRule.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PrometheusRule
|
||||
metadata:
|
||||
name: {{ template "common.names.fullname" . }}
|
||||
{{- if .Values.metrics.prometheusRule.namespace }}
|
||||
namespace: {{ .Values.metrics.prometheusRule.namespace }}
|
||||
{{- else }}
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
{{- end }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
{{- if .Values.metrics.prometheusRule.additionalLabels }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.metrics.prometheusRule.additionalLabels "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.metrics.prometheusRule.rules "context" $ ) | nindent 2 }}
|
||||
{{- end }}
|
||||
@@ -2621,6 +2621,34 @@ metrics:
|
||||
##
|
||||
# scrapeTimeout: 10s
|
||||
|
||||
## PrometheusRule CRD configuration
|
||||
##
|
||||
prometheusRule:
|
||||
enabled: false
|
||||
## Namespace in which the PrometheusRule CRD is created
|
||||
##
|
||||
namespace:
|
||||
## Additional labels for the prometheusRule
|
||||
##
|
||||
additionalLabels: {}
|
||||
## List of group of rules and their rules
|
||||
##
|
||||
## These are just examples rules, please adapt them to your needs.
|
||||
## rules: |
|
||||
## groups:
|
||||
## - name: Compactor
|
||||
## rules:
|
||||
## - alert: ThanosCompactMultipleRunning
|
||||
## annotations:
|
||||
## description: No more than one Thanos Compact instance should be running at once. There are {{`{{`}}$value{{`}}`}} instances running.
|
||||
## runbook_url: https://github.com/thanos-io/thanos/tree/main/mixin/runbook.md#alert-name-thanoscompactmultiplerunning
|
||||
## summary: Thanos Compact has multiple instances running.
|
||||
## expr: sum by (job) (up{job=~"{{ template "common.names.fullname" . }}-compact.*"}) > 1
|
||||
## for: 5m
|
||||
## labels:
|
||||
## severity: warning
|
||||
rules: []
|
||||
|
||||
## Init Container parameters
|
||||
## Change the owner and group of the persistent volume(s) mountpoint(s) to 'runAsUser:fsGroup' on each component
|
||||
## values from the securityContext section of the component
|
||||
|
||||
Reference in New Issue
Block a user