feat(helm): add option to disable log PVCs and mounts (#3189)

Co-authored-by: cxymds <Cxymds@qq.com>
This commit is contained in:
Michael
2026-06-08 12:35:12 +02:00
committed by GitHub
parent ed73952cb6
commit 2fc1cf90e0
5 changed files with 23 additions and 4 deletions
+11 -1
View File
@@ -1,4 +1,5 @@
{{- $logDir := .Values.config.rustfs.obs_log_directory }}
{{- $logDirEnabled := ne $logDir "" }}
{{- if .Values.mode.standalone.enabled }}
apiVersion: apps/v1
@@ -75,13 +76,18 @@ spec:
- sh
- -c
- |
mkdir -p /data /mnt/rustfs/logs
mkdir -p /data
{{- if $logDirEnabled }}
mkdir -p /mnt/rustfs/logs
chmod 755 /mnt/rustfs/logs
{{- end }}
volumeMounts:
- name: data
mountPath: /data
{{- if $logDirEnabled }}
- name: logs
mountPath: /mnt/rustfs
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.rustfs.repository }}:{{ .Values.image.rustfs.tag | default .Chart.AppVersion }}"
@@ -130,9 +136,11 @@ spec:
{{- with .Values.extraVolumeMounts }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if $logDirEnabled }}
- name: logs
mountPath: {{ $logDir }}
subPath: logs
{{- end }}
- name: data
mountPath: /data
volumes:
@@ -161,6 +169,7 @@ spec:
- key: ca.crt
path: client_ca.crt
{{- end }}
{{- if $logDirEnabled }}
- name: logs
persistentVolumeClaim:
{{- if .Values.mode.standalone.existingClaim.logsClaim }}
@@ -168,6 +177,7 @@ spec:
{{- else }}
claimName: {{ include "rustfs.fullname" $ }}-logs
{{- end }}
{{- end }}
- name: data
persistentVolumeClaim:
{{- if .Values.mode.standalone.existingClaim.dataClaim }}