[GlusterFS Dynamic Provisioner] Set GlusterFS Volume Options via StorageClass parameter

Much awaited RFE/Enhancement to the GlusterFS provisioner in Kubernetes !!

Its been long time kubernetes/Openshift users are looking for a feature/functionality to enable various GlusterFS volume options via storage class. We discussed on few methods to implement this in Heketi. One thought was to wrap options under ‘classified’ strings , for eg# when someone asked for ‘encryption’, heketi will internally set ‘client.ssl and server.ssl’ options on the GlusterFS volume in the backend, however finally we decided to have a transparent flow of these options from provisioner to heketi to Gluster.

You could also use this functionality outside kubernetes when using heketi by executing/setting few options to heketi-cli command. For more details on this please refer this Pull Request. or heketi-cli man page.

In Summary you have a new switch/option when creating volumes via heketi-cli command

By the availability of this functionality in heketi, I continued to enable this in Kubernetes GlusterFS dynamic provisioner. If you are using kubernetes and would like to enable/use this functionality what you want is an extra storageclass option called ‘volumeoptions’.

An example storage class file would look like this:

This storageclass allows you to create glusterfs volumes with sharding enabled on them.

Its not limited that, we can use only one option in this string. It can be group of strings, seperated by comma.

Example: “client.ssl on, server.ssl on”.

Please watch below demo which shows how to use this in kubernetes!

As always looking for your great feedback/suggestions \o/.

Digiprove sealCopyright secured by Digiprove © 2017 Humble Chirammal

Leave a Reply

Your email address will not be published. Required fields are marked *