Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to override default volumeclaimtemplate for statefulsets #2554

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be more consistent (with extraEnv, extraEnvFrom, etc, etc) the new value (if we decide to do add it) should be called extraVolumeClaimTemplates and it should be added after the existing conditional section.
If could be added from line 42 (original) as something like:

    {{- with .Values.alertmanager.persistentVolume.extraVolumeClaimTemplates }}
    {{- toYaml . | nindent 4 }}
    {{- end }}

also for the other components.

volumeClaimTemplates:
{{- toYaml .Values.alertmanager.persistentVolume.volumeClaimTemplates | nindent 4}}
{{- else }}
volumeClaimTemplates:
- metadata:
name: storage
Expand All @@ -39,6 +43,7 @@ spec:
requests:
storage: "{{ .Values.alertmanager.persistentVolume.size }}"
{{- end }}
{{- end }}
template:
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -37,6 +41,7 @@ spec:
requests:
storage: "{{ .Values.compactor.persistentVolume.size }}"
{{- end }}
{{- end }}
template:
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -39,6 +43,7 @@ spec:
requests:
storage: "{{ .Values.ingester.persistentVolume.size }}"
{{- end }}
{{- end }}
template:
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -37,6 +41,7 @@ spec:
requests:
storage: "{{ .Values.store_gateway.persistentVolume.size }}"
{{- end }}
{{- end }}
template:
metadata:
labels:
Expand Down
12 changes: 12 additions & 0 deletions operations/helm/charts/mimir-distributed/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,9 @@ alertmanager:
#
# storageClass: "-"

# Allows you to override default volumeClaimTemplates
volumeClaimTemplates: []

readinessProbe:
httpGet:
path: /ready
Expand Down Expand Up @@ -529,6 +532,9 @@ ingester:
#
# storageClass: "-"

# Allows you to override default volumeClaimTemplates
volumeClaimTemplates: []

readinessProbe:
httpGet:
path: /ready
Expand Down Expand Up @@ -896,6 +902,9 @@ store_gateway:
#
# storageClass: "-"

# Allows you to override default volumeClaimTemplates
volumeClaimTemplates: []

readinessProbe:
httpGet:
path: /ready
Expand Down Expand Up @@ -996,6 +1005,9 @@ compactor:
#
# storageClass: "-"

# Allows you to override default volumeClaimTemplates
volumeClaimTemplates: []

readinessProbe:
httpGet:
path: /ready
Expand Down