Skip to content

Commit

Permalink
mimir-distributed: allow StatefulSets to configure their PVC template…
Browse files Browse the repository at this point in the history
… names (#10376)

* helm: allow to configure sts pvc template names

Signed-off-by: Vladimir Varankin <[email protected]>

* update changelog

Signed-off-by: Vladimir Varankin <[email protected]>

* Update operations/helm/charts/mimir-distributed/CHANGELOG.md

Co-authored-by: Taylor C <[email protected]>

---------

Signed-off-by: Vladimir Varankin <[email protected]>
Co-authored-by: Taylor C <[email protected]>
  • Loading branch information
narqo and tacole02 authored Jan 21, 2025
1 parent c2b7623 commit d55f8d4
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 26 deletions.
1 change: 1 addition & 0 deletions operations/helm/charts/mimir-distributed/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Entries should include a reference to the Pull Request that introduced the chang
* [CHANGE] Memcached: Update to Memcached 1.6.34. #10318
* [ENHANCEMENT] Minio: update subchart to v5.4.0. #10346
* [ENHANCEMENT] Individual mimir components can override their container images via the *.image values. The component's image definitions always override the values set in global `image` or `enterprise.image`. #10340
* [ENHANCEMENT] Alertmanager, compactor, ingester, and store-gateway StatefulSets can configure their PVC template name via the corresponding *.persistentVolume.name values. #10376
* [BUGFIX] Fix calculation of `mimir.siToBytes` and use floating point arithmetics. #10044

## 5.6.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,18 @@ spec:
{{- end }}
serviceName: {{ template "mimir.fullname" . }}-alertmanager
{{- if .Values.alertmanager.persistentVolume.enabled }}
{{- with .Values.alertmanager.persistentVolume }}
volumeClaimTemplates:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: storage
{{- if .Values.alertmanager.persistentVolume.annotations }}
name: {{ .name }}
{{- if .annotations }}
annotations:
{{ toYaml .Values.alertmanager.persistentVolume.annotations | nindent 10 }}
{{ toYaml .annotations | nindent 10 }}
{{- end }}
spec:
{{- $storageClass := default .Values.alertmanager.persistentVolume.storageClass $rolloutZone.storageClass }}
{{- $storageClass := default .storageClass $rolloutZone.storageClass }}
{{- if $storageClass }}
{{- if (eq "-" $storageClass) }}
storageClassName: ""
Expand All @@ -51,10 +52,11 @@ spec:
{{- end }}
{{- end }}
accessModes:
{{- toYaml .Values.alertmanager.persistentVolume.accessModes | nindent 10 }}
{{- toYaml .accessModes | nindent 10 }}
resources:
requests:
storage: "{{ .Values.alertmanager.persistentVolume.size }}"
storage: "{{ .size }}"
{{- end }}
{{- end }}
template:
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,30 @@ spec:
{{- toYaml .Values.compactor.strategy | nindent 4 }}
serviceName: {{ template "mimir.fullname" . }}-compactor
{{- if .Values.compactor.persistentVolume.enabled }}
{{- with .Values.compactor.persistentVolume }}
volumeClaimTemplates:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: storage
{{- if .Values.compactor.persistentVolume.annotations }}
name: {{ .name }}
{{- if .annotations }}
annotations:
{{ toYaml .Values.compactor.persistentVolume.annotations | nindent 10 }}
{{ toYaml .annotations | nindent 10 }}
{{- end }}
spec:
{{- if .Values.compactor.persistentVolume.storageClass }}
{{- if (eq "-" .Values.compactor.persistentVolume.storageClass) }}
{{- if .storageClass }}
{{- if (eq "-" .storageClass) }}
storageClassName: ""
{{- else }}
storageClassName: "{{ .Values.compactor.persistentVolume.storageClass }}"
storageClassName: "{{ .storageClass }}"
{{- end }}
{{- end }}
accessModes:
{{- toYaml .Values.compactor.persistentVolume.accessModes | nindent 10 }}
{{- toYaml .accessModes | nindent 10 }}
resources:
requests:
storage: "{{ .Values.compactor.persistentVolume.size }}"
storage: "{{ .size }}"
{{- end }}
{{- end }}
template:
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,18 @@ spec:
{{- end }}
serviceName: {{ template "mimir.fullname" . }}-ingester{{- if not .Values.enterprise.legacyLabels -}}-headless{{- end -}}
{{- if .Values.ingester.persistentVolume.enabled }}
{{- with .Values.ingester.persistentVolume }}
volumeClaimTemplates:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: storage
{{- if .Values.ingester.persistentVolume.annotations }}
name: {{ .name }}
{{- if .annotations }}
annotations:
{{- toYaml .Values.ingester.persistentVolume.annotations | nindent 10 }}
{{- toYaml .annotations | nindent 10 }}
{{- end }}
spec:
{{- $storageClass := default .Values.ingester.persistentVolume.storageClass $rolloutZone.storageClass }}
{{- $storageClass := default .storageClass $rolloutZone.storageClass }}
{{- if $storageClass }}
{{- if (eq "-" $storageClass) }}
storageClassName: ""
Expand All @@ -51,10 +52,11 @@ spec:
{{- end }}
{{- end }}
accessModes:
{{- toYaml .Values.ingester.persistentVolume.accessModes | nindent 10 }}
{{- toYaml .accessModes | nindent 10 }}
resources:
requests:
storage: "{{ .Values.ingester.persistentVolume.size }}"
storage: "{{ .size }}"
{{- end }}
{{- end }}
template:
metadata:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,18 @@ spec:
{{- end }}
serviceName: {{ template "mimir.fullname" . }}-store-gateway{{- if not .Values.enterprise.legacyLabels -}}-headless{{- end -}}
{{- if .Values.store_gateway.persistentVolume.enabled }}
{{- with .Values.store_gateway.persistentVolume }}
volumeClaimTemplates:
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: storage
{{- if .Values.store_gateway.persistentVolume.annotations }}
name: {{ .name }}
{{- if .annotations }}
annotations:
{{- toYaml .Values.store_gateway.persistentVolume.annotations | nindent 10 }}
{{- toYaml .annotations | nindent 10 }}
{{- end }}
spec:
{{- $storageClass := default .Values.store_gateway.persistentVolume.storageClass $rolloutZone.storageClass }}
{{- $storageClass := default .storageClass $rolloutZone.storageClass }}
{{- if $storageClass }}
{{- if (eq "-" $storageClass) }}
storageClassName: ""
Expand All @@ -51,10 +52,11 @@ spec:
{{- end }}
{{- end }}
accessModes:
{{- toYaml .Values.store_gateway.persistentVolume.accessModes | nindent 10 }}
{{- toYaml .accessModes | nindent 10 }}
resources:
requests:
storage: "{{ .Values.store_gateway.persistentVolume.size }}"
storage: "{{ .size }}"
{{- end }}
{{- end }}
template:
metadata:
Expand Down
16 changes: 16 additions & 0 deletions operations/helm/charts/mimir-distributed/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,10 @@ alertmanager:
# If false, use emptyDir
enabled: true

# Alertmanager data Persistent Volume Claim template name
#
name: storage

# Alertmanager data Persistent Volume Claim annotations
#
annotations: {}
Expand Down Expand Up @@ -1015,6 +1019,10 @@ ingester:
#
enabled: true

# Ingester data Persistent Volume Claim template name
#
name: storage

# Ingester data Persistent Volume Claim annotations
#
annotations: {}
Expand Down Expand Up @@ -2154,6 +2162,10 @@ store_gateway:
#
enabled: true

# Store-gateway data Persistent Volume Claim template name
#
name: storage

# Store-gateway data Persistent Volume Claim annotations
#
annotations: {}
Expand Down Expand Up @@ -2366,6 +2378,10 @@ compactor:
#
enabled: true

# compactor data Persistent Volume Claim template name
#
name: storage

# compactor data Persistent Volume Claim annotations
#
annotations: {}
Expand Down

0 comments on commit d55f8d4

Please sign in to comment.