func WithClientSet(c *kubernetes.Clientset) KubeclientBuildOption {
	return func(k *Kubeclient) {
		k.clientset = c
	}
}
WithClientSet sets the kubernetes client against
the kubeclient instance
package persistentvolume
import (
	"context"
	"strings"
	stringer "github.com/openebs/maya/pkg/apis/stringer/v1alpha1"
	errors "github.com/pkg/errors"
	corev1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"github.com/openebs/dynamic-nfs-provisioner/pkg/kubernetes/client"
	"k8s.io/client-go/kubernetes"
)
const (
	KeyNode = "kubernetes.io/hostname"
)
type getClientsetFn func() (clientset *kubernetes.Clientset, err error)
type getClientsetForPathFn func(kubeConfigPath string) (clientset *kubernetes.Clientset, err error)
type getFn func(cli *kubernetes.Clientset, name string, opts metav1.GetOptions) (*corev1.PersistentVolume, error)
type listFn func(cli *kubernetes.Clientset, opts metav1.ListOptions) (*corev1.PersistentVolumeList, error)
type deleteFn func(cli *kubernetes.Clientset, name string, deleteOpts *metav1.DeleteOptions) error
type deleteCollectionFn func(cli *kubernetes.Clientset, listOpts metav1.ListOptions, deleteOpts *metav1.DeleteOptions) error
type createFn func(cli *kubernetes.Clientset, pv *corev1.PersistentVolume, createOpts metav1.CreateOptions) (*corev1.PersistentVolume, error)
type Kubeclient struct {
	clientset *kubernetes.Clientset
	kubeConfigPath string
	getClientset        getClientsetFn
	getClientsetForPath getClientsetForPathFn
	list                listFn
	get                 getFn
	create              createFn
	del                 deleteFn
	delCollection       deleteCollectionFn
}
type KubeclientBuildOption func(*Kubeclient)
func (k *Kubeclient) withDefaults() {
	if k.getClientset == nil {
		k.getClientset = func() (clients *kubernetes.Clientset, err error) {
			return client.New().Clientset()
		}
	}
	if k.getClientsetForPath == nil {
		k.getClientsetForPath = func(kubeConfigPath string) (clients *kubernetes.Clientset, err error) {
			return client.New(client.WithKubeConfigPath(kubeConfigPath)).Clientset()
		}
	}
	if k.get == nil {
		k.get = func(cli *kubernetes.Clientset, name string, opts metav1.GetOptions) (*corev1.PersistentVolume, error) {
			return cli.CoreV1().PersistentVolumes().Get(context.TODO(), name, opts)
		}
	}
	if k.list == nil {
		k.list = func(cli *kubernetes.Clientset, opts metav1.ListOptions) (*corev1.PersistentVolumeList, error) {
			return cli.CoreV1().PersistentVolumes().List(context.TODO(), opts)
		}
	}
	if k.del == nil {
		k.del = func(cli *kubernetes.Clientset, name string, deleteOpts *metav1.DeleteOptions) error {
			return cli.CoreV1().PersistentVolumes().Delete(context.TODO(), name, *deleteOpts)
		}
	}
	if k.delCollection == nil {
		k.delCollection = func(cli *kubernetes.Clientset, listOpts metav1.ListOptions, deleteOpts *metav1.DeleteOptions) error {
			return cli.CoreV1().PersistentVolumes().DeleteCollection(context.TODO(), *deleteOpts, listOpts)
		}
	}
	if k.create == nil {
		k.create = func(cli *kubernetes.Clientset, pv *corev1.PersistentVolume, createOpts metav1.CreateOptions) (*corev1.PersistentVolume, error) {
			return cli.CoreV1().PersistentVolumes().Create(context.TODO(), pv, createOpts)
		}
	}
}