diff --git a/bitnami/thanos/Chart.yaml b/bitnami/thanos/Chart.yaml index f3e780dc6b..2259156c17 100644 --- a/bitnami/thanos/Chart.yaml +++ b/bitnami/thanos/Chart.yaml @@ -35,4 +35,4 @@ maintainers: name: thanos sources: - https://github.com/bitnami/charts/tree/main/bitnami/thanos -version: 12.22.1 +version: 12.23.0 diff --git a/bitnami/thanos/README.md b/bitnami/thanos/README.md index fb7e2da3b4..9b66d653a9 100644 --- a/bitnami/thanos/README.md +++ b/bitnami/thanos/README.md @@ -653,6 +653,7 @@ Check the section [Integrate Thanos with Prometheus and Alertmanager](#integrate | `compactor.ingress.path` | Ingress path | `/` | | `compactor.ingress.pathType` | Ingress path type | `ImplementationSpecific` | | `compactor.persistence.enabled` | Enable data persistence using PVC(s) on Thanos Compactor pods | `true` | +| `compactor.persistence.ephemeral` | Use ephemeral volume for data persistence using PVC(s) on Thanos Compactor pods | `false` | | `compactor.persistence.defaultEmptyDir` | Defaults to emptyDir if persistence is disabled. | `true` | | `compactor.persistence.storageClass` | Specify the `storageClass` used to provision the volume | `""` | | `compactor.persistence.accessModes` | PVC Access Modes for data volume | `["ReadWriteOnce"]` | diff --git a/bitnami/thanos/templates/compactor/_pod-template.tpl b/bitnami/thanos/templates/compactor/_pod-template.tpl index 9ff93ad2bb..de46913c57 100644 --- a/bitnami/thanos/templates/compactor/_pod-template.tpl +++ b/bitnami/thanos/templates/compactor/_pod-template.tpl @@ -223,8 +223,30 @@ spec: {{- if or .Values.compactor.persistence.enabled .Values.compactor.persistence.defaultEmptyDir }} - name: data {{- if .Values.compactor.persistence.enabled }} + {{- if .Values.compactor.persistence.ephemeral }} + ephemeral: + volumeClaimTemplate: + metadata: + {{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.compactor.persistence.labels .Values.commonLabels ) "context" . ) }} + labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 14 }} + app.kubernetes.io/component: compactor + {{- if or .Values.compactor.persistence.annotations .Values.commonAnnotations }} + {{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.compactor.persistence.annotations .Values.commonAnnotations ) "context" . ) }} + annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 14 }} + {{- end }} + spec: + accessModes: + {{- range .Values.compactor.persistence.accessModes }} + - {{ . | quote }} + {{- end }} + {{- include "common.storage.class" (dict "persistence" .Values.compactor.persistence "global" .Values.global) | nindent 12 }} + resources: + requests: + storage: {{ .Values.compactor.persistence.size | quote }} + {{- else }} persistentVolumeClaim: claimName: {{ include "thanos.compactor.pvcName" . }} + {{- end }} {{- else }} emptyDir: {} {{- end }} diff --git a/bitnami/thanos/templates/compactor/pvc.yaml b/bitnami/thanos/templates/compactor/pvc.yaml index 9e41c87286..6083515440 100644 --- a/bitnami/thanos/templates/compactor/pvc.yaml +++ b/bitnami/thanos/templates/compactor/pvc.yaml @@ -3,7 +3,7 @@ Copyright VMware, Inc. SPDX-License-Identifier: APACHE-2.0 */}} -{{- if and .Values.compactor.persistence.enabled (not .Values.compactor.persistence.existingClaim) .Values.compactor.enabled }} +{{- if and .Values.compactor.persistence.enabled (not (or .Values.compactor.persistence.existingClaim .Values.compactor.persistence.ephemeral)) .Values.compactor.enabled }} kind: PersistentVolumeClaim apiVersion: v1 metadata: diff --git a/bitnami/thanos/values.yaml b/bitnami/thanos/values.yaml index 1272343dfd..b569307af9 100644 --- a/bitnami/thanos/values.yaml +++ b/bitnami/thanos/values.yaml @@ -2222,6 +2222,9 @@ compactor: ## @param compactor.persistence.enabled Enable data persistence using PVC(s) on Thanos Compactor pods ## enabled: true + ## @param compactor.persistence.ephemeral Use ephemeral volume for data persistence using PVC(s) on Thanos Compactor pods + ## + ephemeral: false ## @param compactor.persistence.defaultEmptyDir Defaults to emptyDir if persistence is disabled. ## defaultEmptyDir: true