aboutsummaryrefslogtreecommitdiff
path: root/k8s
diff options
context:
space:
mode:
authorMax Roby <max@lil-mac.lan>2023-11-18 20:28:09 +0100
committerChris Lu <chrislusf@users.noreply.github.com>2023-11-20 13:52:04 -0800
commitf46f28fcf9c7369caa5ad2280f1368b008dbd76b (patch)
tree5770cd2bbde4fbf2b7b137566296f081e28d6214 /k8s
parentad9fef7a52105895b1fd7cc8d371b8f63bb2b0c2 (diff)
downloadseaweedfs-f46f28fcf9c7369caa5ad2280f1368b008dbd76b.tar.xz
seaweedfs-f46f28fcf9c7369caa5ad2280f1368b008dbd76b.zip
add support for using an existing claim for volume server
Diffstat (limited to 'k8s')
-rw-r--r--k8s/charts/seaweedfs/templates/volume-statefulset.yaml15
-rw-r--r--k8s/charts/seaweedfs/values.yaml17
2 files changed, 32 insertions, 0 deletions
diff --git a/k8s/charts/seaweedfs/templates/volume-statefulset.yaml b/k8s/charts/seaweedfs/templates/volume-statefulset.yaml
index 66f6adba6..9e2f4f2c0 100644
--- a/k8s/charts/seaweedfs/templates/volume-statefulset.yaml
+++ b/k8s/charts/seaweedfs/templates/volume-statefulset.yaml
@@ -227,18 +227,33 @@ spec:
path: {{ .Values.volume.data.hostPathPrefix }}/object_store/
type: DirectoryOrCreate
{{- end }}
+ {{- if eq .Values.volume.data.type "existingClaim" }}
+ - name: data
+ persistentVolumeClaim:
+ claimName: {{ .Values.volume.data.claimName }}
+ {{- end }}
{{- if and (eq .Values.volume.idx.type "hostPath") .Values.volume.dir_idx }}
- name: idx
hostPath:
path: {{ .Values.volume.idx.hostPathPrefix }}/seaweedfs-volume-idx/
type: DirectoryOrCreate
{{- end }}
+ {{- if eq .Values.volume.idx.type "existingClaim" }}
+ - name: data
+ persistentVolumeClaim:
+ claimName: {{ .Values.volume.idx.claimName }}
+ {{- end }}
{{- if eq .Values.volume.logs.type "hostPath" }}
- name: logs
hostPath:
path: {{ .Values.volume.logs.hostPathPrefix }}/logs/seaweedfs/volume
type: DirectoryOrCreate
{{- end }}
+ {{- if eq .Values.volume.logs.type "existingClaim" }}
+ - name: data
+ persistentVolumeClaim:
+ claimName: {{ .Values.volume.data.claimName }}
+ {{- end }}
{{- if .Values.global.enableSecurity }}
- name: security-config
configMap:
diff --git a/k8s/charts/seaweedfs/values.yaml b/k8s/charts/seaweedfs/values.yaml
index 3b69d8acd..085162eb6 100644
--- a/k8s/charts/seaweedfs/values.yaml
+++ b/k8s/charts/seaweedfs/values.yaml
@@ -77,6 +77,12 @@ master:
# type: "persistentVolumeClaim"
# size: "24Ti"
# storageClass: "local-path-provisioner"
+ #
+ # You may also spacify an existing claim:
+ # data:
+ # type: "existingClaim"
+ # claimName: "my-pvc"
+
data:
type: "hostPath"
size: ""
@@ -222,6 +228,12 @@ volume:
# type: "persistentVolumeClaim"
# size: "24Ti"
# storageClass: "local-path-provisioner"
+#
+# You may also spacify an existing claim:
+# data:
+# type: "existingClaim"
+# claimName: "my-pvc"
+
data:
type: "hostPath"
size: ""
@@ -391,6 +403,11 @@ filer:
# type: "persistentVolumeClaim"
# size: "24Ti"
# storageClass: "local-path-provisioner"
+ #
+ # You may also spacify an existing claim:
+ # data:
+ # type: "existingClaim"
+ # claimName: "my-pvc"
data:
type: "hostPath"
size: ""