From d01a3007125efa170d18e28a8cf32024a723fc89 Mon Sep 17 00:00:00 2001 From: Philippe Vienne Date: Wed, 23 Oct 2024 13:53:45 +0200 Subject: [PATCH] fix: support alertmanager --- charts/mimir/Chart.yaml | 2 +- charts/mimir/monolithic.yaml | 21 +++++++++---------- .../monolithic/monolithic-statefulset.yaml | 11 +++++++++- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/charts/mimir/Chart.yaml b/charts/mimir/Chart.yaml index 25d0de9..c72c16e 100644 --- a/charts/mimir/Chart.yaml +++ b/charts/mimir/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v2 -version: 5.5.0 +version: 5.5.1 appVersion: r305 description: "Grafana Mimir" home: https://grafana.com/docs/helm-charts/mimir-distributed/latest/ diff --git a/charts/mimir/monolithic.yaml b/charts/mimir/monolithic.yaml index ff4ff58..29bf2cb 100644 --- a/charts/mimir/monolithic.yaml +++ b/charts/mimir/monolithic.yaml @@ -39,12 +39,12 @@ monolithic: size: "8Gi" storageClass: gp3-3000-125 priorityClassName: "optional-rescheduling-priority-multi-az" - # The zone aware replication doesn't yet make a lot of difference, since it is not used at query side yet. This is - # however planned in an upcoming release, and therefore it's best to have this configuration already enabled. + # The zone aware replication doesn't yet make a lot of difference, since it is not used at query side yet. This is + # however planned in an upcoming release, and therefore it's best to have this configuration already enabled. zoneAwareReplication: enabled: true - topologyKey: "topology.kubernetes.io/zone" # This generates default anti-affinity rules - zones: # Zone list has to be fully redefined for modification. Update with you actual zones or skip to use logical zones only. + topologyKey: "topology.kubernetes.io/zone" # This generates default anti-affinity rules + zones: # Zone list has to be fully redefined for modification. Update with you actual zones or skip to use logical zones only. - name: zone-a nodeSelector: topology.kubernetes.io/zone: eu-west-1a @@ -63,10 +63,10 @@ nginx: ingress: enabled: true hosts: - - host: "mimir.multi-az.test.ngdata.com" - paths: - - path: / - pathType: Prefix + - host: "mimir.multi-az.test.ngdata.com" + paths: + - path: / + pathType: Prefix tls: # empty, disabled. @@ -75,7 +75,6 @@ minio: enabled: false replicas: 0 -# The Alert manager is currently not used. When enabling, it has to be configured for zone aware replication similar to -# monolithic setup. +# The Alert manager is included in the monolithic deployment alertmanager: - enabled: false \ No newline at end of file + enabled: false diff --git a/charts/mimir/templates/monolithic/monolithic-statefulset.yaml b/charts/mimir/templates/monolithic/monolithic-statefulset.yaml index 47aa3dc..e147af0 100644 --- a/charts/mimir/templates/monolithic/monolithic-statefulset.yaml +++ b/charts/mimir/templates/monolithic/monolithic-statefulset.yaml @@ -106,6 +106,11 @@ spec: {{- end }} - name: active-queries emptyDir: {} + {{- if .Values.alertmanager.fallbackConfig }} + - name: alertmanager-fallback-config + configMap: + name: {{ include "mimir.resourceName" (dict "ctx" . "component" "alertmanager") }}-fallback-config + {{- end }} containers: {{- if .Values.monolithic.extraContainers }} {{ toYaml .Values.monolithic.extraContainers | nindent 8 }} @@ -114,7 +119,7 @@ spec: image: "{{ include "mimir.imageReference" . }}" imagePullPolicy: {{ .Values.image.pullPolicy }} args: - - "-target=all" + - "-target=all,alertmanager" - "-config.expand-env=true" - "-config.file=/etc/mimir/mimir.yaml" {{- if $zoneName }} @@ -162,6 +167,10 @@ spec: {{- end }} - name: active-queries mountPath: /active-query-tracker + {{- if .Values.alertmanager.fallbackConfig }} + - name: alertmanager-fallback-config + mountPath: /configs/ + {{- end }} ports: - name: http-metrics containerPort: {{ include "mimir.serverHttpListenPort" . }}