From 18516db81faf8bcca6c690717c19f90627257deb Mon Sep 17 00:00:00 2001 From: Aliaksandr Shulyak Date: Tue, 26 Jul 2022 16:06:45 -0500 Subject: [PATCH] Option to override default volumeclaimtemplate --- .../alertmanager/alertmanager-statefulset.yaml | 5 +++++ .../templates/compactor/compactor-statefulset.yaml | 5 +++++ .../templates/ingester/ingester-statefulset.yaml | 5 +++++ .../store-gateway/store-gateway-statefulset.yaml | 5 +++++ operations/helm/charts/mimir-distributed/values.yaml | 12 ++++++++++++ 5 files changed, 32 insertions(+) diff --git a/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-statefulset.yaml b/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-statefulset.yaml index d73b68999d..10449a4a39 100644 --- a/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-statefulset.yaml +++ b/operations/helm/charts/mimir-distributed/templates/alertmanager/alertmanager-statefulset.yaml @@ -18,6 +18,10 @@ spec: {{- toYaml .Values.alertmanager.statefulStrategy | nindent 4 }} serviceName: {{ template "mimir.fullname" . }}-alertmanager {{- if .Values.alertmanager.persistentVolume.enabled }} + {{- if .Values.alertmanager.persistentVolume.volumeClaimTemplates }} + volumeClaimTemplates: + {{- toYaml .Values.alertmanager.persistentVolume.volumeClaimTemplates | nindent 4}} + {{- else }} volumeClaimTemplates: - metadata: name: storage @@ -39,6 +43,7 @@ spec: requests: storage: "{{ .Values.alertmanager.persistentVolume.size }}" {{- end }} + {{- end }} template: metadata: labels: diff --git a/operations/helm/charts/mimir-distributed/templates/compactor/compactor-statefulset.yaml b/operations/helm/charts/mimir-distributed/templates/compactor/compactor-statefulset.yaml index e1c3966abc..3a5d4430f8 100644 --- a/operations/helm/charts/mimir-distributed/templates/compactor/compactor-statefulset.yaml +++ b/operations/helm/charts/mimir-distributed/templates/compactor/compactor-statefulset.yaml @@ -16,6 +16,10 @@ spec: {{- toYaml .Values.compactor.strategy | nindent 4 }} serviceName: {{ template "mimir.fullname" . }}-compactor {{- if .Values.compactor.persistentVolume.enabled }} + {{- if .Values.compactor.persistentVolume.volumeClaimTemplates }} + volumeClaimTemplates: + {{- toYaml .Values.compactor.persistentVolume.volumeClaimTemplates | nindent 4}} + {{- else }} volumeClaimTemplates: - metadata: name: storage @@ -37,6 +41,7 @@ spec: requests: storage: "{{ .Values.compactor.persistentVolume.size }}" {{- end }} + {{- end }} template: metadata: labels: diff --git a/operations/helm/charts/mimir-distributed/templates/ingester/ingester-statefulset.yaml b/operations/helm/charts/mimir-distributed/templates/ingester/ingester-statefulset.yaml index f21b728e3f..ca882584fc 100644 --- a/operations/helm/charts/mimir-distributed/templates/ingester/ingester-statefulset.yaml +++ b/operations/helm/charts/mimir-distributed/templates/ingester/ingester-statefulset.yaml @@ -18,6 +18,10 @@ spec: {{- toYaml .Values.ingester.statefulStrategy | nindent 4 }} serviceName: {{ template "mimir.fullname" . }}-ingester{{- if not .Values.enterprise.legacyLabels -}}-headless{{- end -}} {{- if .Values.ingester.persistentVolume.enabled }} + {{- if .Values.ingester.persistentVolume.volumeClaimTemplates }} + volumeClaimTemplates: + {{- toYaml .Values.ingester.persistentVolume.volumeClaimTemplates | nindent 4}} + {{- else }} volumeClaimTemplates: - metadata: name: storage @@ -39,6 +43,7 @@ spec: requests: storage: "{{ .Values.ingester.persistentVolume.size }}" {{- end }} + {{- end }} template: metadata: labels: diff --git a/operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-statefulset.yaml b/operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-statefulset.yaml index db08407b22..4def17f05d 100644 --- a/operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-statefulset.yaml +++ b/operations/helm/charts/mimir-distributed/templates/store-gateway/store-gateway-statefulset.yaml @@ -16,6 +16,10 @@ spec: {{- toYaml .Values.store_gateway.strategy | nindent 4 }} serviceName: {{ template "mimir.fullname" . }}-store-gateway{{- if not .Values.enterprise.legacyLabels -}}-headless{{- end -}} {{- if .Values.store_gateway.persistentVolume.enabled }} + {{- if .Values.store_gateway.persistentVolume.volumeClaimTemplates }} + volumeClaimTemplates: + {{- toYaml .Values.store_gateway.persistentVolume.volumeClaimTemplates | nindent 4}} + {{- else }} volumeClaimTemplates: - metadata: name: storage @@ -37,6 +41,7 @@ spec: requests: storage: "{{ .Values.store_gateway.persistentVolume.size }}" {{- end }} + {{- end }} template: metadata: labels: diff --git a/operations/helm/charts/mimir-distributed/values.yaml b/operations/helm/charts/mimir-distributed/values.yaml index 3129dcfd9b..fe842d0d19 100644 --- a/operations/helm/charts/mimir-distributed/values.yaml +++ b/operations/helm/charts/mimir-distributed/values.yaml @@ -334,6 +334,9 @@ alertmanager: # # storageClass: "-" + # Allows you to override default volumeClaimTemplates + volumeClaimTemplates: [] + readinessProbe: httpGet: path: /ready @@ -529,6 +532,9 @@ ingester: # # storageClass: "-" + # Allows you to override default volumeClaimTemplates + volumeClaimTemplates: [] + readinessProbe: httpGet: path: /ready @@ -896,6 +902,9 @@ store_gateway: # # storageClass: "-" + # Allows you to override default volumeClaimTemplates + volumeClaimTemplates: [] + readinessProbe: httpGet: path: /ready @@ -996,6 +1005,9 @@ compactor: # # storageClass: "-" + # Allows you to override default volumeClaimTemplates + volumeClaimTemplates: [] + readinessProbe: httpGet: path: /ready