func GetStorageDriver(mapOptions common.MapOptions) (*storage.Storage, error) {
	clientSet := utils.GetClientSetWithKubeConfig(mapOptions.KubeConfig.File, mapOptions.KubeConfig.Context)
	if clientSet == nil {
		return nil, errors.Errorf("kubernetes cluster unreachable")
	}
	namespace := mapOptions.ReleaseNamespace
	storageType := getStorageType(mapOptions)
	switch storageType {
	case "configmap", "configmaps", "":
		cfgMaps := driver.NewConfigMaps(clientSet.CoreV1().ConfigMaps(namespace))
		cfgMaps.Log = newLogger("storage/driver").Printf
		return storage.Init(cfgMaps), nil
	case "secret", "secrets":
		secrets := driver.NewSecrets(clientSet.CoreV1().Secrets(namespace))
		secrets.Log = newLogger("storage/driver").Printf
		return storage.Init(secrets), nil
	default:
		panic("Unknown storage driver")
	}
}
GetStorageDriver return handle to Helm v2 backend storage driver
package v2
import (
	"fmt"
	"log"
	"os"
	utils "github.com/maorfr/helm-plugin-utils/pkg"
	"github.com/pkg/errors"
	"k8s.io/helm/pkg/storage"
	"k8s.io/helm/pkg/storage/driver"
	common "github.com/hickeyma/helm-mapkubeapis/pkg/common"
)