Skip to content

Commit 507ae0e

Browse files
author
Dmytro Sydorov
committed
[tempo-distributed] PersistentVolumeClaim for StatefulSets
Set PersistentVolumeClaim for StatefulSets. Docs: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#persistentvolumeclaim-retention Allows an optional automatic PVC cleanup when the storage class has `reclaimPolicy: Delete` Signed-off-by: Dmytro Sydorov <dmytro.sydorov@bonial.com>
1 parent 7b85764 commit 507ae0e

File tree

4 files changed

+17
-3
lines changed

4 files changed

+17
-3
lines changed

charts/tempo-distributed/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: tempo-distributed
33
description: Grafana Tempo in MicroService mode
44
type: application
5-
version: 1.9.1
5+
version: 1.9.2
66
appVersion: 2.4.1
77
engine: gotpl
88
home: https://grafana.com/docs/tempo/latest/

charts/tempo-distributed/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# tempo-distributed
22

3-
![Version: 1.9.1](https://img.shields.io/badge/Version-1.9.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.4.1](https://img.shields.io/badge/AppVersion-2.4.1-informational?style=flat-square)
3+
![Version: 1.9.2](https://img.shields.io/badge/Version-1.9.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.4.1](https://img.shields.io/badge/AppVersion-2.4.1-informational?style=flat-square)
44

55
Grafana Tempo in MicroService mode
66

@@ -495,6 +495,8 @@ The memcached default args are removed and should be provided manually. The sett
495495
| ingester.persistence.annotations | object | `{}` | Annotations for ingester's persist volume claim |
496496
| ingester.persistence.enabled | bool | `false` | Enable creating PVCs which is required when using boltdb-shipper |
497497
| ingester.persistence.inMemory | bool | `false` | use emptyDir with ramdisk instead of PVC. **Please note that all data in ingester will be lost on pod restart** |
498+
| ingester.persistence.persistentVolumeClaimRetentionPolicy.whenDeleted | string | `"Retain"` | |
499+
| ingester.persistence.persistentVolumeClaimRetentionPolicy.whenScaled | string | `"Retain"` | |
498500
| ingester.persistence.size | string | `"10Gi"` | Size of persistent or memory disk |
499501
| ingester.persistence.storageClass | string | `nil` | Storage class to be used. If defined, storageClassName: <storageClass>. If set to "-", storageClassName: "", which disables dynamic provisioning. If empty or set to null, no storageClassName spec is set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack). |
500502
| ingester.podAnnotations | object | `{}` | Annotations for ingester pods |
@@ -590,7 +592,7 @@ The memcached default args are removed and should be provided manually. The sett
590592
| metricsGenerator.image.tag | string | `nil` | Docker image tag for the metrics-generator image. Overrides `tempo.image.tag` |
591593
| metricsGenerator.kind | string | `"Deployment"` | Kind of deployment [StatefulSet/Deployment] |
592594
| metricsGenerator.nodeSelector | object | `{}` | Node selector for metrics-generator pods |
593-
| metricsGenerator.persistence | object | `{"annotations":{},"enabled":false,"size":"10Gi","storageClass":null}` | Persistence configuration for metrics-generator |
595+
| metricsGenerator.persistence | object | `{"annotations":{},"enabled":false,"persistentVolumeClaimRetentionPolicy":{"whenDeleted":"Retain","whenScaled":"Retain"},"size":"10Gi","storageClass":null}` | Persistence configuration for metrics-generator |
594596
| metricsGenerator.persistence.annotations | object | `{}` | Annotations for metrics generator PVCs |
595597
| metricsGenerator.persistence.enabled | bool | `false` | Enable creating PVCs if you have kind set to StatefulSet. This disables using local disk or memory configured in walEmptyDir |
596598
| metricsGenerator.persistence.storageClass | string | `nil` | Storage class to be used. If defined, storageClassName: <storageClass>. If set to "-", storageClassName: "", which disables dynamic provisioning. If empty or set to null, no storageClassName spec is set, choosing the default provisioner (gp2 on AWS, standard on GKE, AWS, and OpenStack). |

charts/tempo-distributed/templates/ingester/statefulset-ingester.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,8 @@ spec:
164164
resources:
165165
requests:
166166
storage: {{ .Values.ingester.persistence.size | quote }}
167+
{{- with .Values.ingester.persistence.persistentVolumeClaimRetentionPolicy }}
168+
persistentVolumeClaimRetentionPolicy:
169+
{{- toYaml . | nindent 10 }}
170+
{{- end }}
167171
{{- end }}

charts/tempo-distributed/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@ ingester:
201201
storageClass: null
202202
# -- Annotations for ingester's persist volume claim
203203
annotations: {}
204+
# Retention policy for PVCs. Possible values: Retain (default) and Delete
205+
persistentVolumeClaimRetentionPolicy:
206+
whenDeleted: Retain
207+
whenScaled: Retain
204208
config:
205209
# -- Number of copies of spans to store in the ingester ring
206210
replication_factor: 3
@@ -308,6 +312,10 @@ metricsGenerator:
308312
storageClass: null
309313
# -- Annotations for metrics generator PVCs
310314
annotations: {}
315+
# Retention policy for PVCs. Possible values: Retain (default) and Delete
316+
persistentVolumeClaimRetentionPolicy:
317+
whenDeleted: Retain
318+
whenScaled: Retain
311319
# -- The EmptyDir location where the /var/tempo will be mounted on. Defaults to local disk, can be set to memory.
312320
walEmptyDir: {}
313321
## Here shows how to configure 1Gi memory as emptyDir.

0 commit comments

Comments
 (0)