[bitnami/clickhouse] Add persistence.volumeName (#33991)

This commit is contained in:
Yannick Utard
2025-06-04 09:24:51 +02:00
committed by GitHub
parent fba182b6df
commit cc78215c73
6 changed files with 18 additions and 10 deletions

View File

@@ -1,8 +1,12 @@
# Changelog # Changelog
## 9.2.7 (2025-06-03) ## 9.3.0 (2025-06-04)
* [bitnami/clickhouse] :zap: :arrow_up: Update dependency references ([#34067](https://github.com/bitnami/charts/pull/34067)) * [bitnami/clickhouse] Add persistence.volumeName ([#33991](https://github.com/bitnami/charts/pull/33991))
## <small>9.2.7 (2025-06-03)</small>
* [bitnami/clickhouse] :zap: :arrow_up: Update dependency references (#34067) ([c77cc95](https://github.com/bitnami/charts/commit/c77cc95447711fb5af803c033cd67424fc23a5fc)), closes [#34067](https://github.com/bitnami/charts/issues/34067)
## <small>9.2.6 (2025-05-30)</small> ## <small>9.2.6 (2025-05-30)</small>

View File

@@ -34,4 +34,4 @@ maintainers:
name: clickhouse name: clickhouse
sources: sources:
- https://github.com/bitnami/charts/tree/main/bitnami/clickhouse - https://github.com/bitnami/charts/tree/main/bitnami/clickhouse
version: 9.2.7 version: 9.3.0

View File

@@ -470,6 +470,7 @@ The [Bitnami ClickHouse](https://github.com/bitnami/containers/tree/main/bitnami
| `persistentVolumeClaimRetentionPolicy.whenScaled` | Volume retention behavior when the replica count of the StatefulSet is reduced | `Retain` | | `persistentVolumeClaimRetentionPolicy.whenScaled` | Volume retention behavior when the replica count of the StatefulSet is reduced | `Retain` |
| `persistentVolumeClaimRetentionPolicy.whenDeleted` | Volume retention behavior that applies when the StatefulSet is deleted | `Retain` | | `persistentVolumeClaimRetentionPolicy.whenDeleted` | Volume retention behavior that applies when the StatefulSet is deleted | `Retain` |
| `persistence.enabled` | Enable persistence using Persistent Volume Claims | `true` | | `persistence.enabled` | Enable persistence using Persistent Volume Claims | `true` |
| `persistence.volumeName` | Name to assign the volume | `data` |
| `persistence.existingClaim` | Name of an existing PVC to use | `""` | | `persistence.existingClaim` | Name of an existing PVC to use | `""` |
| `persistence.storageClass` | Storage class of backing PVC | `""` | | `persistence.storageClass` | Storage class of backing PVC | `""` |
| `persistence.labels` | Persistent Volume Claim labels | `{}` | | `persistence.labels` | Persistent Volume Claim labels | `{}` |

View File

@@ -36,6 +36,6 @@ Returns an init-container that changes the owner and group of the persistent vol
find {{ $roleValues.persistence.mountPath }} -mindepth 1 -maxdepth 1 -not -name ".snapshot" -not -name "lost+found" | xargs -r chown -R {{ $roleValues.containerSecurityContext.runAsUser }}:{{ $roleValues.podSecurityContext.fsGroup }} find {{ $roleValues.persistence.mountPath }} -mindepth 1 -maxdepth 1 -not -name ".snapshot" -not -name "lost+found" | xargs -r chown -R {{ $roleValues.containerSecurityContext.runAsUser }}:{{ $roleValues.podSecurityContext.fsGroup }}
{{- end }} {{- end }}
volumeMounts: volumeMounts:
- name: data - name: {{ $roleValues.persistence.volumeName }}
mountPath: {{ $roleValues.persistence.mountPath }} mountPath: {{ $roleValues.persistence.mountPath }}
{{- end -}} {{- end -}}

View File

@@ -219,7 +219,7 @@ spec:
lifecycle: {{- include "common.tplvalues.render" (dict "value" $.Values.lifecycleHooks "context" $) | nindent 12 }} lifecycle: {{- include "common.tplvalues.render" (dict "value" $.Values.lifecycleHooks "context" $) | nindent 12 }}
{{- end }} {{- end }}
volumeMounts: volumeMounts:
- name: data - name: {{ $.Values.persistence.volumeName }}
mountPath: {{ $.Values.persistence.mountPath }} mountPath: {{ $.Values.persistence.mountPath }}
{{- if or $.Values.configuration $.Values.existingConfigmap }} {{- if or $.Values.configuration $.Values.existingConfigmap }}
- name: configuration - name: configuration
@@ -325,10 +325,10 @@ spec:
{{- include "common.tplvalues.render" (dict "value" $.Values.extraVolumes "context" $) | nindent 8 }} {{- include "common.tplvalues.render" (dict "value" $.Values.extraVolumes "context" $) | nindent 8 }}
{{- end }} {{- end }}
{{- if not $.Values.persistence.enabled }} {{- if not $.Values.persistence.enabled }}
- name: data - name: {{ $.Values.persistence.volumeName }}
emptyDir: {} emptyDir: {}
{{- else if $.Values.persistence.existingClaim }} {{- else if $.Values.persistence.existingClaim }}
- name: data - name: {{ $.Values.persistence.volumeName }}
persistentVolumeClaim: persistentVolumeClaim:
claimName: {{ tpl $.Values.persistence.existingClaim $ }} claimName: {{ tpl $.Values.persistence.existingClaim $ }}
{{- else }} {{- else }}
@@ -341,7 +341,7 @@ spec:
- apiVersion: v1 - apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
metadata: metadata:
name: data name: {{ $.Values.persistence.volumeName }}
{{- if or $.Values.persistence.annotations $.Values.commonAnnotations }} {{- if or $.Values.persistence.annotations $.Values.commonAnnotations }}
{{- $claimAnnotations := include "common.tplvalues.merge" ( dict "values" ( list $.Values.persistence.annotations $.Values.commonLabels ) "context" $ ) }} {{- $claimAnnotations := include "common.tplvalues.merge" ( dict "values" ( list $.Values.persistence.annotations $.Values.commonLabels ) "context" $ ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $claimAnnotations "context" $ ) | nindent 10 }} annotations: {{- include "common.tplvalues.render" ( dict "value" $claimAnnotations "context" $ ) | nindent 10 }}

View File

@@ -892,6 +892,9 @@ persistence:
## @param persistence.enabled Enable persistence using Persistent Volume Claims ## @param persistence.enabled Enable persistence using Persistent Volume Claims
## ##
enabled: true enabled: true
## @param persistence.volumeName Name to assign the volume
##
volumeName: data
## @param persistence.existingClaim Name of an existing PVC to use ## @param persistence.existingClaim Name of an existing PVC to use
## ##
existingClaim: "" existingClaim: ""