Support for “Volume Types” option in Kubernetes GlusterFS dynamic provisioner.

Till now, there was no option to specify various volume types and specifications of dynamically provisioned volumes in Kubernetes or Openshift. The main reason for that being we always recommend to have a ‘replica 3′ volume whenever it provision.

However there were requests from users of GlusterFS dynamic provisioner to have this functionality for various use cases, for example, someone want to setup a quick demo by having a replica 1 or replica 2 volume in a small cluster. Sometimes they want to create an EC volume via storage class…etc.

This functionality has been added some time back to Kubernetes upstream and provide the choice to select volume type in kubernetes/Openshift via Storage Class parameter.

This has been added in below format to the gluster plugins’ storage class.

[terminal]

`volumetype` : The volume type and it’s parameters can be configured with this optional value. If the volume type is not mentioned, it’s up to the provisioner to decide the volume type.

For example:
‘Replica volume’:
`volumetype: replicate:3` where ‘3’ is replica count.

‘Disperse/EC volume’:
`volumetype: disperse:4:2` where ‘4’ is data and ‘2’ is the redundancy count.

‘Distribute volume’:
`volumetype: none`

[/terminal]

Based on above mention, the volumes will be created in the trusted storage pool .

The storage class file will look like this:

[terminal]
apiVersion: storage.k8s.io/v1beta1
kind: StorageClass
metadata:
name: fast
provisioner: kubernetes.io/glusterfs
parameters:
resturl: “http://127.0.0.1:8081”
restuser: “admin”
secretNamespace: “default”
secretName: “heketi-secret”
volumetype: “replicate:2”
[/terminal]

Please let me know if you have any comments/suggestions/feedback about this functionality or if you would like to see any other enhancements to Gluster Dynamic Provisioner in Kubernetes/Openshift.

Digiprove sealCopyright secured by Digiprove © 2017-2020 Humble Chirammal