Skip to content

Commit

Permalink
helm: Allow templating of RBD striping parameters
Browse files Browse the repository at this point in the history
Allow templating of stripeUnit, stripeCount and objectSize
storageClass parameters in ceph-csi-rbd chart

Signed-off-by: Kingsley Jarrett <kj@kingj.net>
  • Loading branch information
KingJ authored and mergify[bot] committed Nov 9, 2023
1 parent c4e373c commit 0a53b0d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
3 changes: 3 additions & 0 deletions charts/ceph-csi-rbd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand Down
9 changes: 9 additions & 0 deletions charts/ceph-csi-rbd/templates/storageclass.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
16 changes: 16 additions & 0 deletions charts/ceph-csi-rbd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0a53b0d

Please sign in to comment.