Skip to content

Commit

Permalink
Merge pull request #3353 from aerfio/aerfio/tempo-enableStatefulSetAu…
Browse files Browse the repository at this point in the history
…toDeletePVC

[tempo] Add ability to set `persistentVolumeClaimRetentionPolicy` in Tempo StatefulSet
  • Loading branch information
Sheikh-Abubaker authored Nov 11, 2024
2 parents c9f5634 + 5a6288b commit 51db949
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/tempo/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: tempo
description: Grafana Tempo Single Binary Mode
type: application
version: 1.13.0
version: 1.14.0
appVersion: 2.6.1
engine: gotpl
home: https://grafana.net
Expand Down
3 changes: 2 additions & 1 deletion charts/tempo/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# tempo

![Version: 1.13.0](https://img.shields.io/badge/Version-1.13.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.6.1](https://img.shields.io/badge/AppVersion-2.6.1-informational?style=flat-square)
![Version: 1.14.0](https://img.shields.io/badge/Version-1.14.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.6.1](https://img.shields.io/badge/AppVersion-2.6.1-informational?style=flat-square)

Grafana Tempo Single Binary Mode

Expand Down Expand Up @@ -31,6 +31,7 @@ Grafana Tempo Single Binary Mode
| networkPolicy.ingress | bool | `true` | |
| nodeSelector | object | `{}` | Node labels for pod assignment. See: https://kubernetes.io/docs/user-guide/node-selection/ |
| persistence.accessModes[0] | string | `"ReadWriteOnce"` | |
| persistence.enableStatefulSetAutoDeletePVC | bool | `false` | Enable StatefulSetAutoDeletePVC feature |
| persistence.enabled | bool | `false` | |
| persistence.size | string | `"10Gi"` | |
| podAnnotations | object | `{}` | Pod Annotations |
Expand Down
5 changes: 5 additions & 0 deletions charts/tempo/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ spec:
{{- if .Values.revisionHistoryLimit }}
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
{{- end }}
{{- if and (semverCompare ">= 1.23-0" .Capabilities.KubeVersion.Version) (.Values.persistence.enableStatefulSetAutoDeletePVC) (.Values.persistence.enabled) }}
persistentVolumeClaimRetentionPolicy:
whenDeleted: Delete
whenScaled: Delete
{{- end }}
selector:
matchLabels:
{{- include "tempo.selectorLabels" . | nindent 6 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/tempo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ serviceMonitor:

persistence:
enabled: false
# -- Enable StatefulSetAutoDeletePVC feature
enableStatefulSetAutoDeletePVC: false
# storageClassName: local-path
accessModes:
- ReadWriteOnce
Expand Down

0 comments on commit 51db949

Please sign in to comment.