diff --git a/docs/sources/setup/install/helm/reference.md b/docs/sources/setup/install/helm/reference.md
index 74be975672..7a6009d3d1 100644
--- a/docs/sources/setup/install/helm/reference.md
+++ b/docs/sources/setup/install/helm/reference.md
@@ -202,6 +202,17 @@ null
{}
+ |
+
+
+ | backend.persistence.dataVolumeParameters |
+ object |
+ Parameters used for the `data` volume when volumeClaimEnabled if false |
+
+{
+ "emptyDir": {}
+}
+
|
@@ -238,6 +249,15 @@ null
null
+ |
+
+
+ | backend.persistence.volumeClaimsEnabled |
+ bool |
+ Enable volume claims in pod spec |
+
+true
+
|
@@ -4546,6 +4566,17 @@ null
{}
+ |
+
+
+ | write.persistence.dataVolumeParameters |
+ object |
+ Parameters used for the `data` volume when volumeClaimEnabled if false |
+
+{
+ "emptyDir": {}
+}
+
|
@@ -4582,6 +4613,15 @@ null
null
+ |
+
+
+ | write.persistence.volumeClaimsEnabled |
+ bool |
+ Enable volume claims in pod spec |
+
+true
+
|
diff --git a/production/helm/loki/CHANGELOG.md b/production/helm/loki/CHANGELOG.md
index 9b7f4c131e..389f52b9b8 100644
--- a/production/helm/loki/CHANGELOG.md
+++ b/production/helm/loki/CHANGELOG.md
@@ -13,6 +13,10 @@ Entries should include a reference to the pull request that introduced the chang
[//]: # ( : do not remove this line. This locator is used by the CI pipeline to automatically create a changelog entry for each new Loki release. Add other chart versions and respective changelog entries bellow this line.)
+## 5.26.0
+
+- [ENHANCEMENT] Allow emptyDir data volumes for backend and write (via `X.persistence.volumeClaimsEnabled: false`)
+
## 5.25.0
- [BUGFIX] Add complete object schema to single-binary volumeClaimTemplate to avoid synchronization issues
diff --git a/production/helm/loki/Chart.yaml b/production/helm/loki/Chart.yaml
index a7cff4bc7f..0ec8d47010 100644
--- a/production/helm/loki/Chart.yaml
+++ b/production/helm/loki/Chart.yaml
@@ -3,7 +3,7 @@ name: loki
description: Helm chart for Grafana Loki in simple, scalable mode
type: application
appVersion: 2.9.1
-version: 5.25.0
+version: 5.26.0
home: https://grafana.github.io/helm-charts
sources:
- https://github.com/grafana/loki
diff --git a/production/helm/loki/README.md b/production/helm/loki/README.md
index 1c2956f09f..318ed08a82 100644
--- a/production/helm/loki/README.md
+++ b/production/helm/loki/README.md
@@ -1,6 +1,6 @@
# loki
-  
+  
Helm chart for Grafana Loki in simple, scalable mode
diff --git a/production/helm/loki/templates/backend/statefulset-backend.yaml b/production/helm/loki/templates/backend/statefulset-backend.yaml
index 7ea2ad5db0..26022c04ff 100644
--- a/production/helm/loki/templates/backend/statefulset-backend.yaml
+++ b/production/helm/loki/templates/backend/statefulset-backend.yaml
@@ -28,7 +28,7 @@ spec:
partition: 0
serviceName: {{ include "loki.backendFullname" . }}-headless
revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }}
- {{- if and (semverCompare ">= 1.23-0" .Capabilities.KubeVersion.Version) (.Values.backend.persistence.enableStatefulSetAutoDeletePVC) }}
+ {{- if and (semverCompare ">= 1.23-0" .Capabilities.KubeVersion.Version) (.Values.backend.persistence.enableStatefulSetAutoDeletePVC) (.Values.backend.persistence.volumeClaimsEnabled) }}
{{/*
Data on the backend nodes is easy to replace, so we want to always delete PVCs to make
operation easier, and will rely on re-fetching data when needed.
@@ -222,6 +222,10 @@ spec:
volumes:
- name: tmp
emptyDir: {}
+ {{- if not .Values.backend.persistence.volumeClaimsEnabled }}
+ - name: data
+ {{- toYaml .Values.backend.persistence.dataVolumeParameters | nindent 10 }}
+ {{- end}}
- name: config
{{- if .Values.loki.existingSecretForConfig }}
secret:
@@ -253,6 +257,7 @@ spec:
{{- with .Values.backend.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
+ {{- if .Values.backend.persistence.volumeClaimsEnabled }}
volumeClaimTemplates:
- apiVersion: v1
kind: PersistentVolumeClaim
@@ -271,4 +276,5 @@ spec:
selector:
{{- toYaml . | nindent 10 }}
{{- end }}
+ {{- end }}
{{- end }}
diff --git a/production/helm/loki/templates/write/statefulset-write.yaml b/production/helm/loki/templates/write/statefulset-write.yaml
index 42644c49c0..79aed8ddd3 100644
--- a/production/helm/loki/templates/write/statefulset-write.yaml
+++ b/production/helm/loki/templates/write/statefulset-write.yaml
@@ -28,7 +28,7 @@ spec:
partition: 0
serviceName: {{ include "loki.writeFullname" . }}-headless
revisionHistoryLimit: {{ .Values.loki.revisionHistoryLimit }}
- {{- if and (semverCompare ">= 1.23-0" .Capabilities.KubeVersion.Version) (.Values.write.persistence.enableStatefulSetAutoDeletePVC) }}
+ {{- if and (semverCompare ">= 1.23-0" .Capabilities.KubeVersion.Version) (.Values.write.persistence.enableStatefulSetAutoDeletePVC) (.Values.write.persistence.volumeClaimsEnabled) }}
{{/*
Data on the write nodes is easy to replace, so we want to always delete PVCs to make
operation easier, and will rely on re-fetching data when needed.
@@ -155,6 +155,10 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
volumes:
+ {{- if not .Values.write.persistence.volumeClaimsEnabled }}
+ - name: data
+ {{- toYaml .Values.write.persistence.dataVolumeParameters | nindent 10 }}
+ {{- end}}
- name: config
{{- if .Values.loki.existingSecretForConfig }}
secret:
@@ -177,6 +181,7 @@ spec:
{{- with .Values.write.extraVolumes }}
{{- toYaml . | nindent 8 }}
{{- end }}
+ {{- if .Values.write.persistence.volumeClaimsEnabled }}
volumeClaimTemplates:
- apiVersion: v1
kind: PersistentVolumeClaim
@@ -198,4 +203,5 @@ spec:
{{- with .Values.write.extraVolumeClaimTemplates }}
{{- toYaml . | nindent 4 }}
{{- end }}
+ {{- end }}
{{- end }}
diff --git a/production/helm/loki/values.yaml b/production/helm/loki/values.yaml
index 24120c6fad..4ba3f3b41e 100644
--- a/production/helm/loki/values.yaml
+++ b/production/helm/loki/values.yaml
@@ -796,6 +796,11 @@ write:
# -- The default is to deploy all pods in parallel.
podManagementPolicy: "Parallel"
persistence:
+ # -- Enable volume claims in pod spec
+ volumeClaimsEnabled: true
+ # -- Parameters used for the `data` volume when volumeClaimEnabled if false
+ dataVolumeParameters:
+ emptyDir: {}
# -- Enable StatefulSetAutoDeletePVC feature
enableStatefulSetAutoDeletePVC: false
# -- Size of persistent disk
@@ -1068,6 +1073,11 @@ backend:
# -- The default is to deploy all pods in parallel.
podManagementPolicy: "Parallel"
persistence:
+ # -- Enable volume claims in pod spec
+ volumeClaimsEnabled: true
+ # -- Parameters used for the `data` volume when volumeClaimEnabled if false
+ dataVolumeParameters:
+ emptyDir: {}
# -- Enable StatefulSetAutoDeletePVC feature
enableStatefulSetAutoDeletePVC: true
# -- Size of persistent disk