diff --git a/helm/README.md b/helm/README.md index 7b60475f5..fd78b8be4 100644 --- a/helm/README.md +++ b/helm/README.md @@ -133,7 +133,8 @@ RustFS helm chart supports **standalone and distributed mode**. For standalone m | storageclass.dataStorageSize | string | `"256Mi"` | The storage size for data PVC. | | storageclass.logStorageSize | string | `"256Mi"` | The storage size for logs PVC. | | storageclass.name | string | `"local-path"` | The name for StorageClass. | -| storageclass.pvcAnnotations | map | `{}` | PVC customized annotations. | +| storageclass.pvcAnnotations.data | map | `{}` | Data pvc customized annotations. | +| storageclass.pvcAnnotations.logs | map | `{}` | Logs pvc customized annotations. | | tolerations | list | `[]` | | | gatewayApi.enabled | bool | `false` | To enable/disable gateway api support. | | gatewayApi.gatewayClass | string | `traefik` | Gateway class implementation. | diff --git a/helm/rustfs/templates/pvc.yaml b/helm/rustfs/templates/pvc.yaml index f6da122fc..a0180c025 100644 --- a/helm/rustfs/templates/pvc.yaml +++ b/helm/rustfs/templates/pvc.yaml @@ -5,7 +5,7 @@ kind: PersistentVolumeClaim metadata: annotations: helm.sh/resource-policy: keep - {{- with .pvcAnnotations }} + {{- with .pvcAnnotations.data }} {{- toYaml .| nindent 4 }} {{- end }} name: {{ include "rustfs.fullname" $ }}-data @@ -31,7 +31,7 @@ kind: PersistentVolumeClaim metadata: annotations: helm.sh/resource-policy: keep - {{- with .pvcAnnotations }} + {{- with .pvcAnnotations.logs }} {{- toYaml .| nindent 4 }} {{- end }} name: {{ include "rustfs.fullname" $ }}-logs diff --git a/helm/rustfs/templates/statefulset.yaml b/helm/rustfs/templates/statefulset.yaml index fd79ec15c..29fe1cbda 100644 --- a/helm/rustfs/templates/statefulset.yaml +++ b/helm/rustfs/templates/statefulset.yaml @@ -193,7 +193,7 @@ spec: labels: {{- toYaml .Values.commonLabels | nindent 10 }} annotations: - {{- toYaml .Values.storageclass.pvcAnnotations | nindent 10 }} + {{- toYaml .Values.storageclass.pvcAnnotations.logs | nindent 10 }} spec: accessModes: ["ReadWriteOnce"] storageClassName: {{ .Values.storageclass.name }} @@ -207,7 +207,7 @@ spec: labels: {{- toYaml $.Values.commonLabels | nindent 10 }} annotations: - {{- toYaml $.Values.storageclass.pvcAnnotations | nindent 10 }} + {{- toYaml $.Values.storageclass.pvcAnnotations.data | nindent 10 }} spec: accessModes: ["ReadWriteOnce"] storageClassName: {{ $.Values.storageclass.name }} @@ -221,7 +221,7 @@ spec: labels: {{- toYaml .Values.commonLabels | nindent 10 }} annotations: - {{- toYaml .Values.storageclass.pvcAnnotations | nindent 10 }} + {{- toYaml .Values.storageclass.pvcAnnotations.data | nindent 10 }} spec: accessModes: ["ReadWriteOnce"] storageClassName: {{ .Values.storageclass.name }} diff --git a/helm/rustfs/values.yaml b/helm/rustfs/values.yaml index 064b7562f..a61089821 100644 --- a/helm/rustfs/values.yaml +++ b/helm/rustfs/values.yaml @@ -265,9 +265,11 @@ storageclass: dataStorageSize: 256Mi logStorageSize: 256Mi pvcAnnotations: {} - # pvcAnnotations: - # - name: team - # value: "RustFS" + #pvcAnnotations: + # data: + # key: value + # logs: + # key: value pdb: create: false