fix: allow Helm chart users to use their own, existing PVC

closes https://github.com/versity/versitygw/issues/1957
This commit is contained in:
Jack Henschel
2026-03-10 12:31:56 -07:00
committed by Ben McClelland
parent c5cda84703
commit b44952d7aa
6 changed files with 15 additions and 4 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ apiVersion: v2
name: versitygw
description: A Helm chart for deploying the Versity S3 Gateway on Kubernetes
type: application
version: 0.2.1
version: 0.3.0
sources:
- https://github.com/versity/versitygw
icon: https://raw.githubusercontent.com/versity/versitygw/main/webui/web/assets/images/Versity-logo-blue-horizontal.png
+2
View File
@@ -59,6 +59,8 @@ helm upgrade my-versitygw oci://ghcr.io/versity/versitygw/charts/versitygw \
--version 0.2.0
```
You can find the list of available Helm chart versions in the [GitHub packages page](https://github.com/versity/versitygw/pkgs/container/versitygw%2Fcharts%2Fversitygw/versions?filters%5Bversion_type%5D=tagged).
## Backend Storage
The `gateway.backend.type` value selects the storage backend. Use `gateway.backend.args` to pass backend-specific arguments.
+5 -1
View File
@@ -79,7 +79,11 @@ Returns empty string if persistence is disabled.
*/}}
{{- define "versitygw.pvcName" -}}
{{- if .Values.persistence.enabled }}
{{- default (printf "%s-data" (include "versitygw.fullname" .)) .Values.persistence.claimName }}
{{- if .Values.persistence.claimName }}
{{- .Values.persistence.claimName }}
{{- else }}
{{- printf "%s-data" (include "versitygw.fullname" .) }}
{{- end }}
{{- end }}
{{- end }}
+3
View File
@@ -4,6 +4,9 @@
{{- fail "Multiple replicas with POSIX backend or Internal IAM require persistence.enabled=true to prevent data loss and inconsistency across pods. If using a stateless backend (e.g. S3, Azure) and external IAM, set persistence.enabled=false." }}
{{- end }}
{{- end }}
{{- if and .Values.persistence.enabled (not .Values.persistence.create) (not .Values.persistence.claimName) }}
{{- fail "persistence.claimName is required when persistence.create is false" }}
{{- end }}
apiVersion: apps/v1
kind: Deployment
metadata:
+1 -1
View File
@@ -1,4 +1,4 @@
{{- if .Values.persistence.enabled -}}
{{- if and .Values.persistence.enabled .Values.persistence.create -}}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
+3 -1
View File
@@ -282,7 +282,9 @@ persistence:
# If disabled, an emptyDir (ephemeral!) will be used instead of a PVC.
# NOTE: Data will be lost on pod restart if persistence is disabled.
enabled: true
# Use an existing PVC instead of creating a new one.
# Whether to create a new PVC. If false, persistence.claimName must be provided.
create: true
# The name of the PVC that should be created or used (if persistence.create=false)
claimName: ""
size: 10Gi
storageClassName: ""