add ability to pass annotations to the volumeClaimtemplate, enables k8up usage

This commit is contained in:
Max Roby 2023-11-19 11:02:23 +01:00 committed by Chris Lu
parent 08812f8f5d
commit 8ba2bffdba
4 changed files with 49 additions and 14 deletions

View file

@ -335,6 +335,10 @@ spec:
{{- if eq .Values.filer.data.type "persistentVolumeClaim"}} {{- if eq .Values.filer.data.type "persistentVolumeClaim"}}
- metadata: - metadata:
name: data-filer name: data-filer
{{- with .Values.filer.data.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
spec: spec:
accessModes: [ "ReadWriteOnce" ] accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.filer.data.storageClass }} storageClassName: {{ .Values.filer.data.storageClass }}
@ -345,6 +349,10 @@ spec:
{{- if eq .Values.filer.logs.type "persistentVolumeClaim"}} {{- if eq .Values.filer.logs.type "persistentVolumeClaim"}}
- metadata: - metadata:
name: seaweedfs-filer-log-volume name: seaweedfs-filer-log-volume
{{- with .Values.filer.logs.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
spec: spec:
accessModes: [ "ReadWriteOnce" ] accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.filer.logs.storageClass }} storageClassName: {{ .Values.filer.logs.storageClass }}

View file

@ -273,6 +273,10 @@ spec:
{{- if eq .Values.master.data.type "persistentVolumeClaim"}} {{- if eq .Values.master.data.type "persistentVolumeClaim"}}
- metadata: - metadata:
name: data-{{ .Release.Namespace }} name: data-{{ .Release.Namespace }}
{{- with .Values.master.data.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
spec: spec:
accessModes: [ "ReadWriteOnce" ] accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.master.data.storageClass }} storageClassName: {{ .Values.master.data.storageClass }}
@ -283,6 +287,10 @@ spec:
{{- if eq .Values.master.logs.type "persistentVolumeClaim"}} {{- if eq .Values.master.logs.type "persistentVolumeClaim"}}
- metadata: - metadata:
name: seaweedfs-master-log-volume name: seaweedfs-master-log-volume
{{- with .Values.master.logs.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
spec: spec:
accessModes: [ "ReadWriteOnce" ] accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.master.logs.storageClass }} storageClassName: {{ .Values.master.logs.storageClass }}

View file

@ -288,6 +288,10 @@ spec:
{{- if eq .Values.volume.data.type "persistentVolumeClaim"}} {{- if eq .Values.volume.data.type "persistentVolumeClaim"}}
- metadata: - metadata:
name: data name: data
{{- with .Values.volume.data.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
spec: spec:
accessModes: [ "ReadWriteOnce" ] accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.volume.data.storageClass }} storageClassName: {{ .Values.volume.data.storageClass }}
@ -298,6 +302,10 @@ spec:
{{- if and (eq .Values.volume.idx.type "persistentVolumeClaim") .Values.volume.dir_idx }} {{- if and (eq .Values.volume.idx.type "persistentVolumeClaim") .Values.volume.dir_idx }}
- metadata: - metadata:
name: idx name: idx
{{- with .Values.volume.idx.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
spec: spec:
accessModes: [ "ReadWriteOnce" ] accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.volume.idx.storageClass }} storageClassName: {{ .Values.volume.idx.storageClass }}
@ -308,6 +316,10 @@ spec:
{{- if eq .Values.volume.logs.type "persistentVolumeClaim" }} {{- if eq .Values.volume.logs.type "persistentVolumeClaim" }}
- metadata: - metadata:
name: logs name: logs
{{- with .Values.volume.logs.annotations }}
annotations:
{{- toYaml . | nindent 10 }}
{{- end }}
spec: spec:
accessModes: [ "ReadWriteOnce" ] accessModes: [ "ReadWriteOnce" ]
storageClassName: {{ .Values.volume.logs.storageClass }} storageClassName: {{ .Values.volume.logs.storageClass }}

View file

@ -72,17 +72,19 @@ master:
# Enter any extra configuration for master.toml here. # Enter any extra configuration for master.toml here.
# It may be be a multi-line string. # 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: # data:
# type: "persistentVolumeClaim" # type: "persistentVolumeClaim"
# size: "24Ti" # size: "24Ti"
# storageClass: "local-path-provisioner" # storageClass: "local-path-provisioner"
# annotations:
# "key": "value"
# #
# You may also spacify an existing claim: # You may also spacify an existing claim:
# data: # data:
# type: "existingClaim" # type: "existingClaim"
# claimName: "my-pvc" # claimName: "my-pvc"
data: data:
type: "hostPath" type: "hostPath"
size: "" size: ""
@ -223,16 +225,19 @@ volume:
# minimum free disk space(in percents). If free disk space lower this value - all volumes marks as ReadOnly # minimum free disk space(in percents). If free disk space lower this value - all volumes marks as ReadOnly
minFreeSpacePercent: 7 minFreeSpacePercent: 7
# can use ANY storage-class , example with local-path-provisioner # You may use ANY storage-class, example with local-path-provisioner
# data: # Annotations are optional.
# type: "persistentVolumeClaim" # data:
# size: "24Ti" # type: "persistentVolumeClaim"
# storageClass: "local-path-provisioner" # size: "24Ti"
# # storageClass: "local-path-provisioner"
# You may also spacify an existing claim: # annotations:
# data: # "key": "value"
# type: "existingClaim" #
# claimName: "my-pvc" # You may also spacify an existing claim:
# data:
# type: "existingClaim"
# claimName: "my-pvc"
data: data:
type: "hostPath" type: "hostPath"
@ -397,12 +402,14 @@ filer:
storage: 25Gi storage: 25Gi
# storageClass is the class of storage which defaults to null (the Kube cluster will pick the default). # storageClass is the class of storage which defaults to null (the Kube cluster will pick the default).
storageClass: null storageClass: null
# You may use ANY storage-class, example with local-path-provisioner
# can use ANY storage-class , example with local-path-provisioner # Annotations are optional.
# data: # data:
# type: "persistentVolumeClaim" # type: "persistentVolumeClaim"
# size: "24Ti" # size: "24Ti"
# storageClass: "local-path-provisioner" # storageClass: "local-path-provisioner"
# annotations:
# "key": "value"
# #
# You may also spacify an existing claim: # You may also spacify an existing claim:
# data: # data: