storagecapabilities

package
v1.61.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProvisionerNoobaa is the provisioner string for the Noobaa object bucket provisioner which does not work with CDI
	ProvisionerNoobaa = "openshift-storage.noobaa.io/obc"
	// ProvisionerOCSBucket is the provisioner string for the downstream ODF/OCS provisoner for buckets which does not work with CDI
	ProvisionerOCSBucket = "openshift-storage.ceph.rook.io/bucket"
	// ProvisionerRookCephBucket is the provisioner string for the upstream Rook Ceph provisoner for buckets which does not work with CDI
	ProvisionerRookCephBucket = "rook-ceph.ceph.rook.io/bucket"
	// ProvisionerStorkSnapshot is the provisioner string for the Stork snapshot provisoner which does not work with CDI
	ProvisionerStorkSnapshot = "stork-snapshot"
)

Variables

View Source
var CapabilitiesByProvisionerKey = map[string][]StorageCapabilities{

	"kubevirt.io.hostpath-provisioner": {{rwo, file}},
	"kubevirt.io/hostpath-provisioner": {{rwo, file}},
	"k8s.io/minikube-hostpath":         {{rwo, file}},

	"nfs.csi.k8s.io": {{rwx, file}},
	"k8s-sigs.io/nfs-subdir-external-provisioner": {{rwx, file}},

	"kubernetes.io/rbd":                  createRbdCapabilities(),
	"rbd.csi.ceph.com":                   createRbdCapabilities(),
	"rook-ceph.rbd.csi.ceph.com":         createRbdCapabilities(),
	"openshift-storage.rbd.csi.ceph.com": createRbdCapabilities(),

	"cephfs.csi.ceph.com":                   {{rwx, file}},
	"openshift-storage.cephfs.csi.ceph.com": {{rwx, file}},

	"linstor.csi.linbit.com": createAllButRWXFileCapabilities(),

	"csi-unity.dellemc.com":     createAllButRWXFileCapabilities(),
	"csi-unity.dellemc.com/nfs": createAllFSCapabilities(),

	"csi-vxflexos.dellemc.com":     createDellPowerFlexCapabilities(),
	"csi-vxflexos.dellemc.com/nfs": createAllFSCapabilities(),

	"csi-isilon.dellemc.com": createAllFSCapabilities(),

	"csi-powermax.dellemc.com":     createDellPowerMaxCapabilities(),
	"csi-powermax.dellemc.com/nfs": createAllFSCapabilities(),

	"csi-powerstore.dellemc.com":     createDellPowerStoreCapabilities(),
	"csi-powerstore.dellemc.com/nfs": createAllFSCapabilities(),

	"kubernetes.io/storageos": {{rwo, file}},
	"storageos":               {{rwo, file}},

	"kubernetes.io/aws-ebs": {{rwo, block}},
	"ebs.csi.aws.com":       {{rwo, block}},
	"ebs.csi.aws.com/io2":   {{rwx, block}, {rwo, block}, {rwo, file}},

	"efs.csi.aws.com": {{rwx, file}, {rwo, file}},

	"kubernetes.io/azure-disk": {{rwo, block}},
	"disk.csi.azure.com":       {{rwo, block}},

	"kubernetes.io/azure-file": {{rwx, file}},
	"file.csi.azure.com":       {{rwx, file}},

	"kubernetes.io/gce-pd":  {{rwo, block}},
	"pd.csi.storage.gke.io": {{rwo, block}},

	"hspc.csi.hitachi.com": {{rwx, block}, {rwo, block}, {rwo, file}},

	"csi.hpe.com": {{rwx, block}, {rwo, block}, {rwo, file}},

	"spectrumscale.csi.ibm.com": {{rwx, file}, {rwo, file}},

	"block.csi.ibm.com": {{rwo, block}, {rwo, file}},

	"kubernetes.io/portworx-volume/shared": {{rwx, file}},
	"kubernetes.io/portworx-volume":        {{rwo, file}},

	"pxd.openstorage.org/shared": createOpenStorageSharedVolumeCapabilities(),
	"pxd.openstorage.org":        createOpenStorageSharedVolumeCapabilities(),
	"pxd.portworx.com/shared":    createOpenStorageSharedVolumeCapabilities(),
	"pxd.portworx.com":           createOpenStorageSharedVolumeCapabilities(),

	"csi.trident.netapp.io/ontap-nas": {{rwx, file}, {rwo, file}},
	"csi.trident.netapp.io/ontap-san": {{rwx, block}},

	"topolvm.cybozu.com": createTopoLVMCapabilities(),
	"topolvm.io":         createTopoLVMCapabilities(),

	"cinder.csi.openstack.org": createRWOBlockAndFilesystemCapabilities(),

	"manila.csi.openstack.org": {{rwx, file}},

	"csi.ovirt.org": createRWOBlockAndFilesystemCapabilities(),

	"infinibox-csi-driver/iscsiorfibrechannel": {{rwx, block}, {rwo, block}, {rwo, file}},
	"infinibox-csi-driver/nfs":                 {{rwx, file}, {rwo, file}},

	"csi.vsphere.vmware.com":     {{rwo, block}, {rwo, file}},
	"csi.vsphere.vmware.com/nfs": {{rwx, file}, {rwo, block}, {rwo, file}},

	"csi.huawei.com":     createAllButRWXFileCapabilities(),
	"csi.huawei.com/nfs": createAllFSCapabilities(),

	"kubesan.gitlab.io": {{rwx, block}, {rox, block}, {rwo, block}, {rwo, file}},

	"driver.longhorn.io":            {{rwo, block}},
	"driver.longhorn.io/migratable": {{rwx, block}, {rwo, block}},
}

CapabilitiesByProvisionerKey defines default capabilities for different storage classes

View Source
var CloneStrategyByProvisionerKey = map[string]cdiv1.CDICloneStrategy{
	"csi-vxflexos.dellemc.com":                 cdiv1.CloneStrategyCsiClone,
	"csi-isilon.dellemc.com":                   cdiv1.CloneStrategyCsiClone,
	"csi-powermax.dellemc.com":                 cdiv1.CloneStrategyCsiClone,
	"csi-powerstore.dellemc.com":               cdiv1.CloneStrategyCsiClone,
	"hspc.csi.hitachi.com":                     cdiv1.CloneStrategyCsiClone,
	"csi.hpe.com":                              cdiv1.CloneStrategyCsiClone,
	"spectrumscale.csi.ibm.com":                cdiv1.CloneStrategyCsiClone,
	"rook-ceph.rbd.csi.ceph.com":               cdiv1.CloneStrategyCsiClone,
	"openshift-storage.rbd.csi.ceph.com":       cdiv1.CloneStrategyCsiClone,
	"cephfs.csi.ceph.com":                      cdiv1.CloneStrategyCsiClone,
	"openshift-storage.cephfs.csi.ceph.com":    cdiv1.CloneStrategyCsiClone,
	"pxd.openstorage.org/shared":               cdiv1.CloneStrategyCsiClone,
	"pxd.openstorage.org":                      cdiv1.CloneStrategyCsiClone,
	"pxd.portworx.com/shared":                  cdiv1.CloneStrategyCsiClone,
	"pxd.portworx.com":                         cdiv1.CloneStrategyCsiClone,
	"topolvm.cybozu.com":                       cdiv1.CloneStrategyHostAssisted,
	"topolvm.io":                               cdiv1.CloneStrategyHostAssisted,
	"infinibox-csi-driver/iscsiorfibrechannel": cdiv1.CloneStrategyCsiClone,
	"infinibox-csi-driver/nfs":                 cdiv1.CloneStrategyCsiClone,
	"csi.trident.netapp.io/ontap-nas":          cdiv1.CloneStrategySnapshot,
	"csi.trident.netapp.io/ontap-san":          cdiv1.CloneStrategySnapshot,
	"kubesan.gitlab.io":                        cdiv1.CloneStrategyCsiClone,
}

CloneStrategyByProvisionerKey defines the advised clone strategy for a provisioner

View Source
var SourceFormatsByProvisionerKey = map[string]cdiv1.DataImportCronSourceFormat{
	"rook-ceph.rbd.csi.ceph.com":         cdiv1.DataImportCronSourceFormatSnapshot,
	"openshift-storage.rbd.csi.ceph.com": cdiv1.DataImportCronSourceFormatSnapshot,
	"csi.trident.netapp.io/ontap-nas":    cdiv1.DataImportCronSourceFormatSnapshot,
	"csi.trident.netapp.io/ontap-san":    cdiv1.DataImportCronSourceFormatSnapshot,
}

SourceFormatsByProvisionerKey defines the advised data import cron source format Certain storage provisioners will scale better cloning from a single source VolumeSnapshot source

UnsupportedProvisioners is a hash of provisioners which are known not to work with CDI

Functions

func GetAdvisedCloneStrategy added in v1.57.0

func GetAdvisedCloneStrategy(sc *storagev1.StorageClass) (cdiv1.CDICloneStrategy, bool)

GetAdvisedCloneStrategy finds and returns the advised clone strategy

func GetAdvisedSourceFormat added in v1.57.0

func GetAdvisedSourceFormat(sc *storagev1.StorageClass) (cdiv1.DataImportCronSourceFormat, bool)

GetAdvisedSourceFormat finds and returns the advised format for dataimportcron sources

Types

type StorageCapabilities

type StorageCapabilities struct {
	AccessMode v1.PersistentVolumeAccessMode
	VolumeMode v1.PersistentVolumeMode
}

StorageCapabilities is a simple holder of storage capabilities (accessMode etc.)

func GetCapabilities added in v1.57.0

func GetCapabilities(cl client.Client, sc *storagev1.StorageClass) ([]StorageCapabilities, bool)

GetCapabilities finds and returns a predefined StorageCapabilities for a given StorageClass

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL