Skip to content

Commit

Permalink
[tempo-distributed] PersistentVolumeClaim for StatefulSets
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
sydorovdmytro committed Apr 2, 2024
1 parent 7b85764 commit 0c263bb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion charts/tempo-distributed/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,8 @@ The memcached default args are removed and should be provided manually. The sett
| ingester.persistence.annotations | object | `{}` | Annotations for ingester's persist volume claim |
| ingester.persistence.enabled | bool | `false` | Enable creating PVCs which is required when using boltdb-shipper |
| 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** |
| ingester.persistence.persistentVolumeClaimRetentionPolicy.whenDeleted | string | `"Retain"` | |
| ingester.persistence.persistentVolumeClaimRetentionPolicy.whenScaled | string | `"Retain"` | |
| ingester.persistence.size | string | `"10Gi"` | Size of persistent or memory disk |
| 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). |
| ingester.podAnnotations | object | `{}` | Annotations for ingester pods |
Expand Down Expand Up @@ -590,7 +592,7 @@ The memcached default args are removed and should be provided manually. The sett
| metricsGenerator.image.tag | string | `nil` | Docker image tag for the metrics-generator image. Overrides `tempo.image.tag` |
| metricsGenerator.kind | string | `"Deployment"` | Kind of deployment [StatefulSet/Deployment] |
| metricsGenerator.nodeSelector | object | `{}` | Node selector for metrics-generator pods |
| metricsGenerator.persistence | object | `{"annotations":{},"enabled":false,"size":"10Gi","storageClass":null}` | Persistence configuration for metrics-generator |
| metricsGenerator.persistence | object | `{"annotations":{},"enabled":false,"persistentVolumeClaimRetentionPolicy":{"whenDeleted":"Retain","whenScaled":"Retain"},"size":"10Gi","storageClass":null}` | Persistence configuration for metrics-generator |
| metricsGenerator.persistence.annotations | object | `{}` | Annotations for metrics generator PVCs |
| 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 |
| 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). |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,8 @@ spec:
resources:
requests:
storage: {{ .Values.ingester.persistence.size | quote }}
{{- with .Values.ingester.persistence.persistentVolumeClaimRetentionPolicy }}
persistentVolumeClaimRetentionPolicy:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- end }}
8 changes: 8 additions & 0 deletions charts/tempo-distributed/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ ingester:
storageClass: null
# -- Annotations for ingester's persist volume claim
annotations: {}
# Retention policy for PVCs. Possible values: Retain (default) and Delete
persistentVolumeClaimRetentionPolicy:
whenDeleted: Retain
whenScaled: Retain
config:
# -- Number of copies of spans to store in the ingester ring
replication_factor: 3
Expand Down Expand Up @@ -308,6 +312,10 @@ metricsGenerator:
storageClass: null
# -- Annotations for metrics generator PVCs
annotations: {}
# Retention policy for PVCs. Possible values: Retain (default) and Delete
persistentVolumeClaimRetentionPolicy:
whenDeleted: Retain
whenScaled: Retain
# -- The EmptyDir location where the /var/tempo will be mounted on. Defaults to local disk, can be set to memory.
walEmptyDir: {}
## Here shows how to configure 1Gi memory as emptyDir.
Expand Down

0 comments on commit 0c263bb

Please sign in to comment.