From 568b66b637d2a440b0c26ae504cbb1402af9a0e7 Mon Sep 17 00:00:00 2001 From: mw Date: Thu, 1 Aug 2024 12:14:52 +0200 Subject: [PATCH 1/2] fix(base-cluster/kube-prometheus-stack): set deployment strategy to recreate when persistence is enabled --- .../monitoring/kube-prometheus-stack/_grafana-config.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/charts/base-cluster/templates/monitoring/kube-prometheus-stack/_grafana-config.yaml b/charts/base-cluster/templates/monitoring/kube-prometheus-stack/_grafana-config.yaml index 0785546cb..d8018db1f 100644 --- a/charts/base-cluster/templates/monitoring/kube-prometheus-stack/_grafana-config.yaml +++ b/charts/base-cluster/templates/monitoring/kube-prometheus-stack/_grafana-config.yaml @@ -46,6 +46,12 @@ resources: {{- include "common.resources" .Values.monitoring.grafana | nindent 2 persistence: {{- include "common.storage.class" (dict "persistence" .Values.monitoring.grafana.persistence "global" $.Values.global) | nindent 2 }} enabled: true size: {{ .Values.monitoring.grafana.persistence.size }} + accessModes: + - ReadWriteOnce +{{- end }} +{{- .Values.monitoring.grafana.persistence.enabled}} +deploymentStrategy: + type: Recreate {{- end }} serviceMonitor: interval: "30s" From a8ab893e4221c61b8cd4fd756f9b5cf907a2d05b Mon Sep 17 00:00:00 2001 From: mw Date: Thu, 1 Aug 2024 12:18:16 +0200 Subject: [PATCH 2/2] fix(base-cluster/kube-prometheus-stack): i somehow messed up the checks --- .../monitoring/kube-prometheus-stack/_grafana-config.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/charts/base-cluster/templates/monitoring/kube-prometheus-stack/_grafana-config.yaml b/charts/base-cluster/templates/monitoring/kube-prometheus-stack/_grafana-config.yaml index d8018db1f..8fa2a69dc 100644 --- a/charts/base-cluster/templates/monitoring/kube-prometheus-stack/_grafana-config.yaml +++ b/charts/base-cluster/templates/monitoring/kube-prometheus-stack/_grafana-config.yaml @@ -48,8 +48,6 @@ persistence: {{- include "common.storage.class" (dict "persistence" .Values.moni size: {{ .Values.monitoring.grafana.persistence.size }} accessModes: - ReadWriteOnce -{{- end }} -{{- .Values.monitoring.grafana.persistence.enabled}} deploymentStrategy: type: Recreate {{- end }}