Files
rustfs/helm/rustfs/templates/pvc.yaml
T
majinghe 2d4d240508 feat: add existing pvc claim for standalone (#1829)
Co-authored-by: houseme <housemecn@gmail.com>
Co-authored-by: loverustfs <hello@rustfs.com>
2026-02-15 15:49:37 +08:00

45 lines
1.1 KiB
YAML

{{- if and .Values.mode.standalone.enabled (not .Values.mode.standalone.existingClaim.dataClaim) }}
{{- with .Values.storageclass }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
helm.sh/resource-policy: keep
name: {{ include "rustfs.fullname" $ }}-data
namespace: {{ $.Release.Namespace }}
labels:
{{- toYaml $.Values.commonLabels | nindent 4 }}
spec:
accessModes: [ ReadWriteOnce ]
{{- with .name }}
storageClassName: {{ . }}
{{- end }}
resources:
requests:
storage: {{ .dataStorageSize }}
{{- end }}
{{- end }}
{{- if and .Values.mode.standalone.enabled (not .Values.mode.standalone.existingClaim.logsClaim) }}
{{- with .Values.storageclass }}
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
helm.sh/resource-policy: keep
name: {{ include "rustfs.fullname" $ }}-logs
namespace: {{ $.Release.Namespace }}
labels:
{{- toYaml $.Values.commonLabels | nindent 4 }}
spec:
accessModes: [ ReadWriteOnce ]
{{- with .name }}
storageClassName: {{ . }}
{{- end }}
resources:
requests:
storage: {{ .logStorageSize }}
{{- end }}
{{- end }}