aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Roby <max@lil-mac.lan>2023-11-19 11:02:23 +0100
committerChris Lu <chrislusf@users.noreply.github.com>2023-11-20 13:52:04 -0800
commit8ba2bffdbaaf9a8c70debf8f0aaa8ee6debe313b (patch)
tree6d62a200523ab453a09087d2db432025073ed8c8
parent08812f8f5def5f917e63b2a35119cef47aae1632 (diff)
downloadseaweedfs-8ba2bffdbaaf9a8c70debf8f0aaa8ee6debe313b.tar.xz
seaweedfs-8ba2bffdbaaf9a8c70debf8f0aaa8ee6debe313b.zip
add ability to pass annotations to the volumeClaimtemplate, enables k8up usage
-rw-r--r--k8s/charts/seaweedfs/templates/filer-statefulset.yaml8
-rw-r--r--k8s/charts/seaweedfs/templates/master-statefulset.yaml8
-rw-r--r--k8s/charts/seaweedfs/templates/volume-statefulset.yaml12
-rw-r--r--k8s/charts/seaweedfs/values.yaml35
4 files changed, 49 insertions, 14 deletions
diff --git a/k8s/charts/seaweedfs/templates/filer-statefulset.yaml b/k8s/charts/seaweedfs/templates/filer-statefulset.yaml
index 1079e537e..515454cf0 100644
--- a/k8s/charts/seaweedfs/templates/filer-statefulset.yaml
+++ b/k8s/charts/seaweedfs/templates/filer-statefulset.yaml
@@ -335,6 +335,10 @@ spec:
{{- if eq .Values.filer.data.type "persistentVolumeClaim"}}
- metadata:
name: data-filer
+ {{- with .Values.filer.data.annotations }}
+ annotations:
+ {{- toYaml . | nindent 10 }}
+ {{- end }}
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.filer.data.storageClass }}
@@ -345,6 +349,10 @@ spec:
{{- if eq .Values.filer.logs.type "persistentVolumeClaim"}}
- metadata:
name: seaweedfs-filer-log-volume
+ {{- with .Values.filer.logs.annotations }}
+ annotations:
+ {{- toYaml . | nindent 10 }}
+ {{- end }}
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.filer.logs.storageClass }}
diff --git a/k8s/charts/seaweedfs/templates/master-statefulset.yaml b/k8s/charts/seaweedfs/templates/master-statefulset.yaml
index 15b1e9eb4..a8c4cdaf0 100644
--- a/k8s/charts/seaweedfs/templates/master-statefulset.yaml
+++ b/k8s/charts/seaweedfs/templates/master-statefulset.yaml
@@ -273,6 +273,10 @@ spec:
{{- if eq .Values.master.data.type "persistentVolumeClaim"}}
- metadata:
name: data-{{ .Release.Namespace }}
+ {{- with .Values.master.data.annotations }}
+ annotations:
+ {{- toYaml . | nindent 10 }}
+ {{- end }}
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.master.data.storageClass }}
@@ -283,6 +287,10 @@ spec:
{{- if eq .Values.master.logs.type "persistentVolumeClaim"}}
- metadata:
name: seaweedfs-master-log-volume
+ {{- with .Values.master.logs.annotations }}
+ annotations:
+ {{- toYaml . | nindent 10 }}
+ {{- end }}
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.master.logs.storageClass }}
diff --git a/k8s/charts/seaweedfs/templates/volume-statefulset.yaml b/k8s/charts/seaweedfs/templates/volume-statefulset.yaml
index 1ac17d9e8..dc89cf9d3 100644
--- a/k8s/charts/seaweedfs/templates/volume-statefulset.yaml
+++ b/k8s/charts/seaweedfs/templates/volume-statefulset.yaml
@@ -288,6 +288,10 @@ spec:
{{- if eq .Values.volume.data.type "persistentVolumeClaim"}}
- metadata:
name: data
+ {{- with .Values.volume.data.annotations }}
+ annotations:
+ {{- toYaml . | nindent 10 }}
+ {{- end }}
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.volume.data.storageClass }}
@@ -298,6 +302,10 @@ spec:
{{- if and (eq .Values.volume.idx.type "persistentVolumeClaim") .Values.volume.dir_idx }}
- metadata:
name: idx
+ {{- with .Values.volume.idx.annotations }}
+ annotations:
+ {{- toYaml . | nindent 10 }}
+ {{- end }}
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.volume.idx.storageClass }}
@@ -308,6 +316,10 @@ spec:
{{- if eq .Values.volume.logs.type "persistentVolumeClaim" }}
- metadata:
name: logs
+ {{- with .Values.volume.logs.annotations }}
+ annotations:
+ {{- toYaml . | nindent 10 }}
+ {{- end }}
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.volume.logs.storageClass }}
diff --git a/k8s/charts/seaweedfs/values.yaml b/k8s/charts/seaweedfs/values.yaml
index 085162eb6..df36e1152 100644
--- a/k8s/charts/seaweedfs/values.yaml
+++ b/k8s/charts/seaweedfs/values.yaml
@@ -72,17 +72,19 @@ master:
# Enter any extra configuration for master.toml here.
# It may be be a multi-line string.
- # can use ANY storage-class , example with local-path-provisioner
+ # You may use ANY storage-class, example with local-path-provisioner
+ # Annotations are optional.
# data:
# type: "persistentVolumeClaim"
# size: "24Ti"
# storageClass: "local-path-provisioner"
+ # annotations:
+ # "key": "value"
#
# You may also spacify an existing claim:
# data:
# type: "existingClaim"
# claimName: "my-pvc"
-
data:
type: "hostPath"
size: ""
@@ -223,16 +225,19 @@ volume:
# minimum free disk space(in percents). If free disk space lower this value - all volumes marks as ReadOnly
minFreeSpacePercent: 7
-# can use ANY storage-class , example with local-path-provisioner
-# data:
-# type: "persistentVolumeClaim"
-# size: "24Ti"
-# storageClass: "local-path-provisioner"
-#
-# You may also spacify an existing claim:
-# data:
-# type: "existingClaim"
-# claimName: "my-pvc"
+ # You may use ANY storage-class, example with local-path-provisioner
+ # Annotations are optional.
+ # data:
+ # type: "persistentVolumeClaim"
+ # size: "24Ti"
+ # storageClass: "local-path-provisioner"
+ # annotations:
+ # "key": "value"
+ #
+ # You may also spacify an existing claim:
+ # data:
+ # type: "existingClaim"
+ # claimName: "my-pvc"
data:
type: "hostPath"
@@ -397,12 +402,14 @@ filer:
storage: 25Gi
# storageClass is the class of storage which defaults to null (the Kube cluster will pick the default).
storageClass: null
-
- # can use ANY storage-class , example with local-path-provisioner
+ # You may use ANY storage-class, example with local-path-provisioner
+ # Annotations are optional.
# data:
# type: "persistentVolumeClaim"
# size: "24Ti"
# storageClass: "local-path-provisioner"
+ # annotations:
+ # "key": "value"
#
# You may also spacify an existing claim:
# data: