feat(ZFSPV): adding support for applications to create "zfs" flesystem (#15)

Application can now create a storageclass to create zfs filesystem

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: openebs-zfspv5
allowVolumeExpansion: true
parameters:
  blocksize: "4k"
  fstype: "zfs"
  poolname: "zfspv-pool"
provisioner: zfs.csi.openebs.io

ZFSPV was supporting ext2/3/4 and xfs filesystem only which
adds one extra filesystem layer on top of ZFS filesystem. So now
we can driectly write to the ZFS filesystem and get the optimal performance
by directly creating ZFS filesystem for storage.

Signed-off-by: Pawan <pawan@mayadata.io>
This commit is contained in:
Pawan Prakash Sharma 2019-11-21 19:00:15 +05:30 committed by Kiran Mova
parent 4ffd857191
commit 68db6d2774
13 changed files with 428 additions and 176 deletions

View file

@ -142,13 +142,27 @@ func (b *Builder) WithOwnerNode(host string) *Builder {
return b
}
// WithBlockSize sets blocksize of ZFSVolume
func (b *Builder) WithBlockSize(blockSize string) *Builder {
bs := "4k"
if len(blockSize) > 0 {
bs = blockSize
}
b.volume.Object.Spec.BlockSize = bs
// WithRecordSize sets the recordsize of ZFSVolume
func (b *Builder) WithRecordSize(rs string) *Builder {
b.volume.Object.Spec.RecordSize = rs
return b
}
// WithVolBlockSize sets the volblocksize of ZFSVolume
func (b *Builder) WithVolBlockSize(bs string) *Builder {
b.volume.Object.Spec.VolBlockSize = bs
return b
}
// WithVolumeType sets if ZFSVolume needs to be thin provisioned
func (b *Builder) WithVolumeType(vtype string) *Builder {
b.volume.Object.Spec.VolumeType = vtype
return b
}
// WithFsType sets filesystem for the ZFSVolume
func (b *Builder) WithFsType(fstype string) *Builder {
b.volume.Object.Spec.FsType = fstype
return b
}