From 5e63f626f48b30575efe7c21284fe1abbe5b4186 Mon Sep 17 00:00:00 2001 From: KJ Date: Sun, 5 Nov 2023 15:24:19 +0000 Subject: [PATCH] helm: Allow templating of RBD striping parameters Allow templating of stripeUnit, stripeCount and objectSize storageClass parameters in ceph-csi-rbd chart Signed-off-by: Kingsley Jarrett --- charts/ceph-csi-rbd/README.md | 3 +++ charts/ceph-csi-rbd/templates/storageclass.yaml | 9 +++++++++ charts/ceph-csi-rbd/values.yaml | 16 ++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/charts/ceph-csi-rbd/README.md b/charts/ceph-csi-rbd/README.md index 165d2bf8f9f..f6097f3125c 100644 --- a/charts/ceph-csi-rbd/README.md +++ b/charts/ceph-csi-rbd/README.md @@ -204,6 +204,9 @@ charts and their default values. | `storageClass.topologyConstrainedPools` | Add topology constrained pools configuration, if topology based pools are setup, and topology constrained provisioning is required | `[]` | | `storageClass.mapOptions` | Specifies comma-separated list of map options | `""` | | `storageClass.unmapOtpions` | Specifies comma-separated list of unmap options | `""` | +| `storageClass.stripeUnit` | Specifies the stripe unit in bytes | `""` | +| `storageClass.stripeCount` | Specifies the number of objects to stripe over before looping | `""` | +| `storageClass.objectSize` | Specifies the object size in bytes | `""` | | `storageClass.provisionerSecret` | The secrets have to contain user and/or Ceph admin credentials. | `csi-rbd-secret` | | `storageClass.provisionerSecretNamespace` | Specifies the provisioner secret namespace | `""` | | `storageClass.controllerExpandSecret` | Specifies the controller expand secret name | `csi-rbd-secret` | diff --git a/charts/ceph-csi-rbd/templates/storageclass.yaml b/charts/ceph-csi-rbd/templates/storageclass.yaml index a559456aa2b..91e3478d5e9 100644 --- a/charts/ceph-csi-rbd/templates/storageclass.yaml +++ b/charts/ceph-csi-rbd/templates/storageclass.yaml @@ -51,6 +51,15 @@ parameters: {{- end }} {{- if .Values.storageClass.unmapOptions }} unmapOptions: {{ .Values.storageClass.unmapOptions }} +{{- end }} +{{- if .Values.storageClass.stripeUnit }} + stripeUnit: {{ .Values.storageClass.stripeUnit | quote }} +{{- end }} +{{- if .Values.storageClass.stripeCount }} + stripeCount: {{ .Values.storageClass.stripeCount | quote }} +{{- end }} +{{- if .Values.storageClass.objectSize }} + objectSize: {{ .Values.storageClass.objectSize | quote }} {{- end }} csi.storage.k8s.io/provisioner-secret-name: {{ .Values.storageClass.provisionerSecret }} {{- if .Values.storageClass.provisionerSecretNamespace }} diff --git a/charts/ceph-csi-rbd/values.yaml b/charts/ceph-csi-rbd/values.yaml index 64b74e2abd2..be736bde1da 100644 --- a/charts/ceph-csi-rbd/values.yaml +++ b/charts/ceph-csi-rbd/values.yaml @@ -424,6 +424,22 @@ storageClass: # unmapOptions: "krbd:force;nbd:force" unmapOptions: "" + # (optional) stripe unit in bytes + # If set, stripeCount must also be specified + # For defaults, refer to + # https://docs.ceph.com/en/latest/man/8/rbd/#striping + stripeUnit: "" + + # (optional) number of objects to stripe over before looping + # If set, stripeUnit must also be specified + # For defaults, refer to + # https://docs.ceph.com/en/latest/man/8/rbd/#striping + stripeCount: "" + + # (optional) object size in bytes + # If set, must be a power of 2 + objectSize: "" + # The secrets have to contain Ceph credentials with required access # to the 'pool'. provisionerSecret: csi-rbd-secret