mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-27 15:37:02 +00:00
feat: add existing pvc claim for standalone (#1829)
Co-authored-by: houseme <housemecn@gmail.com> Co-authored-by: loverustfs <hello@rustfs.com>
This commit is contained in:
@@ -75,6 +75,8 @@ RustFS helm chart supports **standalone and distributed mode**. For standalone m
|
|||||||
| livenessProbe.timeoutSeconds | int | `3` | |
|
| livenessProbe.timeoutSeconds | int | `3` | |
|
||||||
| mode.distributed.enabled | bool | `true` | RustFS distributed mode support, namely multiple pod multiple pvc. |
|
| mode.distributed.enabled | bool | `true` | RustFS distributed mode support, namely multiple pod multiple pvc. |
|
||||||
| mode.standalone.enabled | bool | `false` | RustFS standalone mode support, namely one pod one pvc. |
|
| mode.standalone.enabled | bool | `false` | RustFS standalone mode support, namely one pod one pvc. |
|
||||||
|
| mode.standalone.existingClaim.dataClaim |string |`""` |Whether to use existing pvc claim for data storage. |
|
||||||
|
| mode.standalone.existingClaim.logsClaim |string |`""` |Whether to use existing pvc claim for logs storage. |
|
||||||
| mtls.enabled | bool | `false` | Enable mtls betweens pods. |
|
| mtls.enabled | bool | `false` | Enable mtls betweens pods. |
|
||||||
| mtls.serverOnly | bool | `false` | Only enable server https. |
|
| mtls.serverOnly | bool | `false` | Only enable server https. |
|
||||||
| nameOverride | string | `""` | |
|
| nameOverride | string | `""` | |
|
||||||
|
|||||||
@@ -60,10 +60,6 @@ spec:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
securityContext:
|
securityContext:
|
||||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||||
{{- if .Values.imagePullSecrets }}
|
|
||||||
imagePullSecrets:
|
|
||||||
{{- toYaml .Values.imagePullSecrets | nindent 8 }}
|
|
||||||
{{- end }}
|
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: init-step
|
- name: init-step
|
||||||
image: "{{ .Values.image.initImage.repository }}:{{ .Values.image.initImage.tag }}"
|
image: "{{ .Values.image.initImage.repository }}:{{ .Values.image.initImage.tag }}"
|
||||||
@@ -127,8 +123,16 @@ spec:
|
|||||||
volumes:
|
volumes:
|
||||||
- name: logs
|
- name: logs
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: {{ include "rustfs.fullname" . }}-logs
|
{{- if .Values.mode.standalone.existingClaim.logsClaim }}
|
||||||
|
claimName: {{ .Values.mode.standalone.existingClaim.logsClaim }}
|
||||||
|
{{- else }}
|
||||||
|
claimName: {{ include "rustfs.fullname" $ }}-logs
|
||||||
|
{{- end }}
|
||||||
- name: data
|
- name: data
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: {{ include "rustfs.fullname" . }}-data
|
{{- if .Values.mode.standalone.existingClaim.dataClaim }}
|
||||||
|
claimName: {{ .Values.mode.standalone.existingClaim.dataClaim }}
|
||||||
|
{{- else }}
|
||||||
|
claimName: {{ include "rustfs.fullname" $ }}-data
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{{- if .Values.mode.standalone.enabled }}
|
{{- if and .Values.mode.standalone.enabled (not .Values.mode.standalone.existingClaim.dataClaim) }}
|
||||||
{{- with .Values.storageclass }}
|
{{- with .Values.storageclass }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
@@ -17,9 +17,12 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: {{ .dataStorageSize }}
|
storage: {{ .dataStorageSize }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if and .Values.mode.standalone.enabled (not .Values.mode.standalone.existingClaim.logsClaim) }}
|
||||||
|
{{- with .Values.storageclass }}
|
||||||
---
|
---
|
||||||
|
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: PersistentVolumeClaim
|
kind: PersistentVolumeClaim
|
||||||
metadata:
|
metadata:
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ mode:
|
|||||||
rollingUpdate:
|
rollingUpdate:
|
||||||
maxSurge: 0
|
maxSurge: 0
|
||||||
maxUnavailable: 1
|
maxUnavailable: 1
|
||||||
|
existingClaim:
|
||||||
|
dataClaim: ""
|
||||||
|
logsClaim: ""
|
||||||
distributed:
|
distributed:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user