mirror of
https://github.com/rustfs/rustfs.git
synced 2026-09-03 18:55:39 +00:00
feat(helm): add option to disable log PVCs and mounts (#3189)
Co-authored-by: cxymds <Cxymds@qq.com>
This commit is contained in:
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user