Skip to content

Commit ba6e277

Browse files
committed
fix(helm): add temporary storage volume and mount for sidecar rules
Signed-off-by: Jan-Otto Kröpke <[email protected]>
1 parent 20f0b11 commit ba6e277

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
lines changed

production/helm/loki/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Entries should include a reference to the pull request that introduced the chang
1313

1414
## Unreleased
1515

16+
- [BUGFIX] add temporary storage volume and mount for sidecar rule [#19973](https://github.com/grafana/loki/pull/19973)
1617
- [BUGFIX] Don't mark loki.storage.bucketNames.chunks as required, if an s3 url is provided. [#19873](https://github.com/grafana/loki/pull/19873)
1718
- [BUGFIX] Do not mark loki.storage.bucketNames.chunks as required, if minio is used. [#19871](https://github.com/grafana/loki/pull/19871)
1819
- [ENHANCEMENT] Use fsGroupChangePolicy=OnRootMismatch on loki to speed up pod starts [#13942](https://github.com/grafana/loki/pull/13942)

production/helm/loki/templates/backend/statefulset-backend.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ spec:
218218
volumeMounts:
219219
- name: sc-rules-volume
220220
mountPath: {{ .Values.sidecar.rules.folder | quote }}
221+
- name: sc-tmp
222+
mountPath: /tmp
221223
{{- end}}
222224
{{- with .Values.backend.extraContainers }}
223225
{{- toYaml . | nindent 8}}
@@ -245,10 +247,14 @@ spec:
245247
volumes:
246248
- name: tmp
247249
emptyDir: {}
250+
{{- if .Values.sidecar.rules.enabled }}
251+
- name: sc-tmp
252+
emptyDir: {}
253+
{{- end }}
248254
{{- if not .Values.backend.persistence.volumeClaimsEnabled }}
249255
- name: data
250256
{{- toYaml .Values.backend.persistence.dataVolumeParameters | nindent 10 }}
251-
{{- end}}
257+
{{- end }}
252258
- name: config
253259
{{- include "loki.configVolume" . | nindent 10 }}
254260
- name: runtime-config

production/helm/loki/templates/ruler/statefulset-ruler.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@ spec:
192192
volumeMounts:
193193
- name: sc-rules-volume
194194
mountPath: {{ .Values.sidecar.rules.folder | quote }}
195+
- name: sc-tmp
196+
mountPath: /tmp/
195197
{{- end}}
196198
{{- with .Values.ruler.extraContainers }}
197199
{{- toYaml . | nindent 8}}
@@ -243,6 +245,10 @@ spec:
243245
{{- end }}
244246
- name: tmp
245247
emptyDir: {}
248+
{{- if .Values.sidecar.rules.enabled }}
249+
- name: sc-tmp
250+
emptyDir: {}
251+
{{- end }}
246252
{{- with (concat .Values.global.extraVolumes .Values.ruler.extraVolumes) | uniq }}
247253
{{- toYaml . | nindent 8 }}
248254
{{- end }}

production/helm/loki/templates/single-binary/statefulset.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,8 @@ spec:
228228
volumeMounts:
229229
- name: sc-rules-volume
230230
mountPath: {{ .Values.sidecar.rules.folder | quote }}
231+
- name: sc-tmp
232+
mountPath: /tmp
231233
{{- end}}
232234
{{- with .Values.singleBinary.extraContainers }}
233235
{{- toYaml . | nindent 8 }}
@@ -251,6 +253,10 @@ spec:
251253
volumes:
252254
- name: tmp
253255
emptyDir: {}
256+
{{- if .Values.sidecar.rules.enabled }}
257+
- name: sc-tmp
258+
emptyDir: {}
259+
{{- end }}
254260
- name: config
255261
{{- include "loki.configVolume" . | nindent 10 }}
256262
- name: runtime-config

0 commit comments

Comments
 (0)