[bitnami/thanos] Add validation for Thanos receive configuration (#27501)

This commit is contained in:
irizzant
2024-06-26 08:11:02 +02:00
committed by GitHub
parent 52dfed6bac
commit fbf31b7dc5
3 changed files with 23 additions and 3 deletions

View File

@@ -1,8 +1,12 @@
# Changelog
## 15.7.9 (2024-06-18)
## 15.7.10 (2024-06-24)
* [bitnami/thanos] Release 15.7.9 ([#27424](https://github.com/bitnami/charts/pull/27424))
* [bitnami/thanos] Add validation for Thanos receive configuration ([#27501](https://github.com/bitnami/charts/pull/27501))
## <small>15.7.9 (2024-06-18)</small>
* [bitnami/thanos] Release 15.7.9 (#27424) ([ef0b51e](https://github.com/bitnami/charts/commit/ef0b51e43f2de5b48901baca609aeac475513d8c)), closes [#27424](https://github.com/bitnami/charts/issues/27424)
## <small>15.7.8 (2024-06-18)</small>

View File

@@ -35,4 +35,4 @@ maintainers:
name: thanos
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/thanos
version: 15.7.9
version: 15.7.10

View File

@@ -441,6 +441,7 @@ Compile all warnings into a single message, and call fail.
{{- $messages := append $messages (include "thanos.validateValues.ruler.alertmanagers" .) -}}
{{- $messages := append $messages (include "thanos.validateValues.ruler.config" .) -}}
{{- $messages := append $messages (include "thanos.validateValues.sharded.service" .) -}}
{{- $messages := append $messages (include "thanos.validateValues.receive" .) -}}
{{- $messages := without $messages "" -}}
{{- $message := join "\n" $messages -}}
@@ -460,6 +461,21 @@ thanos: objstore configuration
2) Provide it using an existing Secret and using the 'existingObjstoreSecret' parameter
3) Put your objstore.yml under the 'files/conf/' directory
{{- end -}}
{{- end -}}
{{/* Validate values of Thanos - Objstore configuration */}}
{{- define "thanos.validateValues.receive" -}}
{{- if and .Values.receive.enabled .Values.receive.autoscaling.enabled (eq .Values.receive.mode "standalone") -}}
thanos: receive configuration
Thanos receive component cannot be enabled with autoscaling and standalone mode at the same time or the receive hashring will not be properly configured.
To achieve autoscaling,
1) Set the 'receive.mode' to 'dual-mode' (see ref: https://github.com/thanos-io/thanos/blob/release-0.22/docs/proposals-accepted/202012-receive-split.md)
2) Set the 'receive.existingConfigMap' the same as here https://github.com/observatorium/thanos-receive-controller/blob/7140e9476289b57b815692c3ec2dfd95b5fb4b6b/examples/manifests/deployment.yaml#L29
3) Set the 'receive.statefulsetLabels' to:
controller.receive.thanos.io: thanos-receive-controller
controller.receive.thanos.io/hashring: default (same as https://github.com/observatorium/thanos-receive-controller/blob/7140e9476289b57b815692c3ec2dfd95b5fb4b6b/examples/manifests/configmap.yaml#L6)
4) Deploy Thanos Receive Controller as shown here: https://github.com/observatorium/thanos-receive-controller/tree/main/examples/manifests (remember to adjust the namespace according to your environment)
{{- end -}}
{{- end -}}
{{/* Validate values of Thanos - Ruler Alertmanager(s) */}}