-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix DELL storagecapabilities #3249
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -50,28 +50,32 @@ var CapabilitiesByProvisionerKey = map[string][]StorageCapabilities{ | |||||||
"openshift-storage.cephfs.csi.ceph.com": {{rwx, file}}, | ||||||||
// LINSTOR | ||||||||
"linstor.csi.linbit.com": createLinstorCapabilities(), | ||||||||
// dell-unity-csi | ||||||||
"csi-unity.dellemc.com": createDellUnityCapabilities(), | ||||||||
// PowerFlex | ||||||||
"csi-vxflexos.dellemc.com": createDellPowerCapabilities(), | ||||||||
// PowerScale | ||||||||
"csi-isilon.dellemc.com": createDellPowerCapabilities(), | ||||||||
// PowerMax | ||||||||
"csi-powermax.dellemc.com": createDellPowerCapabilities(), | ||||||||
// PowerStore | ||||||||
"csi-powerstore.dellemc.com": createDellPowerCapabilities(), | ||||||||
// DELL Unity XT | ||||||||
"csi-unity.dellemc.com": createDellUnityCapabilities(), | ||||||||
"csi-unity.dellemc.com/nfs": createAllFSCapabilities(), | ||||||||
// DELL PowerFlex | ||||||||
"csi-vxflexos.dellemc.com": createDellPowerFlexCapabilities(), | ||||||||
"csi-vxflexos.dellemc.com/nfs": createAllFSCapabilities(), | ||||||||
// DELL PowerScale | ||||||||
"csi-isilon.dellemc.com": createAllFSCapabilities(), | ||||||||
// DELL PowerMax | ||||||||
"csi-powermax.dellemc.com": createDellPowerMaxCapabilities(), | ||||||||
"csi-powermax.dellemc.com/nfs": createAllFSCapabilities(), | ||||||||
// DELL PowerStore | ||||||||
"csi-powerstore.dellemc.com": createDellPowerStoreCapabilities(), | ||||||||
"csi-powerstore.dellemc.com/nfs": createAllFSCapabilities(), | ||||||||
// storageos | ||||||||
"kubernetes.io/storageos": {{rwo, file}}, | ||||||||
"storageos": {{rwo, file}}, | ||||||||
//AWSElasticBlockStore | ||||||||
// AWSElasticBlockStore | ||||||||
"kubernetes.io/aws-ebs": {{rwo, block}}, | ||||||||
"ebs.csi.aws.com": {{rwo, block}}, | ||||||||
//AWSElasticFileSystem | ||||||||
// AWSElasticFileSystem | ||||||||
"efs.csi.aws.com": {{rwx, file}, {rwo, file}}, | ||||||||
//Azure disk | ||||||||
// Azure disk | ||||||||
"kubernetes.io/azure-disk": {{rwo, block}}, | ||||||||
"disk.csi.azure.com": {{rwo, block}}, | ||||||||
//Azure file | ||||||||
// Azure file | ||||||||
"kubernetes.io/azure-file": {{rwx, file}}, | ||||||||
"file.csi.azure.com": {{rwx, file}}, | ||||||||
// GCE Persistent Disk | ||||||||
|
@@ -280,12 +284,55 @@ var storageClassToProvisionerKeyMapper = map[string]func(sc *storagev1.StorageCl | |||||||
} | ||||||||
}, | ||||||||
"csi.vsphere.vmware.com": func(sc *storagev1.StorageClass) string { | ||||||||
fsType := sc.Parameters["csi.storage.k8s.io/fstype"] | ||||||||
fsType := getFSType(sc) | ||||||||
if strings.Contains(fsType, "nfs") { | ||||||||
return "csi.vsphere.vmware.com/nfs" | ||||||||
} | ||||||||
return "csi.vsphere.vmware.com" | ||||||||
}, | ||||||||
"csi-unity.dellemc.com": func(sc *storagev1.StorageClass) string { | ||||||||
// https://github.com/dell/csi-unity/blob/1f42af327f4130df65c5532f6029559e4ab579b5/samples/storageclass | ||||||||
switch strings.ToLower(sc.Parameters["protocol"]) { | ||||||||
case "nfs": | ||||||||
return "csi-unity.dellemc.com/nfs" | ||||||||
default: | ||||||||
return "csi-unity.dellemc.com" | ||||||||
} | ||||||||
}, | ||||||||
"csi-powerstore.dellemc.com": func(sc *storagev1.StorageClass) string { | ||||||||
// https://github.com/dell/csi-powerstore/blob/76e2cb671bd3cb28aa860e9057649d1d911e1deb/samples/storageclass | ||||||||
fsType := getFSType(sc) | ||||||||
switch fsType { | ||||||||
case "nfs": | ||||||||
return "csi-powerstore.dellemc.com/nfs" | ||||||||
default: | ||||||||
return "csi-powerstore.dellemc.com" | ||||||||
} | ||||||||
}, | ||||||||
"csi-vxflexos.dellemc.com": func(sc *storagev1.StorageClass) string { | ||||||||
// https://github.com/dell/csi-powerflex/tree/main/samples/storageclass | ||||||||
fsType := getFSType(sc) | ||||||||
switch fsType { | ||||||||
case "nfs": | ||||||||
return "csi-vxflexos.dellemc.com/nfs" | ||||||||
default: | ||||||||
return "csi-vxflexos.dellemc.com" | ||||||||
} | ||||||||
}, | ||||||||
"csi-powermax.dellemc.com": func(sc *storagev1.StorageClass) string { | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If it's ok now I'll try to add the last three to a function, because they have the same string key ( |
||||||||
// https://github.com/dell/csi-powermax/tree/main/samples/storageclass | ||||||||
fsType := getFSType(sc) | ||||||||
switch fsType { | ||||||||
case "nfs": | ||||||||
return "csi-powermax.dellemc.com/nfs" | ||||||||
default: | ||||||||
return "csi-powermax.dellemc.com" | ||||||||
} | ||||||||
}, | ||||||||
} | ||||||||
|
||||||||
func getFSType(sc *storagev1.StorageClass) string { | ||||||||
return strings.ToLower(sc.Parameters["csi.storage.k8s.io/fstype"]) | ||||||||
} | ||||||||
|
||||||||
func createRbdCapabilities() []StorageCapabilities { | ||||||||
|
@@ -316,11 +363,39 @@ func createDellUnityCapabilities() []StorageCapabilities { | |||||||
} | ||||||||
} | ||||||||
|
||||||||
func createDellPowerCapabilities() []StorageCapabilities { | ||||||||
func createDellPowerMaxCapabilities() []StorageCapabilities { | ||||||||
return []StorageCapabilities{ | ||||||||
{rwx, block}, | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @akalenyu according to the Dell doc PowerMax/PoweFlwex/PowerStore suppport RWX/ROX for Filesystem volume mode with NFS only. Shouldn't we add them to the capabilities? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, there's a good chance this driver needs us to differentiate over one of storage class parameters, containerized-data-importer/pkg/storagecapabilities/storagecapabilities.go Lines 292 to 294 in 8423424
TBH usually it's best to have the storage provider make the recommendation There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it ok now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So the way they indicate this is nfs is via There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After checking I think you are right. I can't find anything else that mentions |
||||||||
{rwo, block}, | ||||||||
{rwo, file}, | ||||||||
{rox, block}, | ||||||||
} | ||||||||
} | ||||||||
|
||||||||
func createDellPowerFlexCapabilities() []StorageCapabilities { | ||||||||
return []StorageCapabilities{ | ||||||||
{rwx, block}, | ||||||||
{rwo, block}, | ||||||||
{rwo, file}, | ||||||||
{rox, block}, | ||||||||
{rox, file}, | ||||||||
} | ||||||||
} | ||||||||
|
||||||||
func createAllFSCapabilities() []StorageCapabilities { | ||||||||
return []StorageCapabilities{ | ||||||||
{rwx, file}, | ||||||||
{rwo, file}, | ||||||||
{rox, file}, | ||||||||
} | ||||||||
} | ||||||||
|
||||||||
func createDellPowerStoreCapabilities() []StorageCapabilities { | ||||||||
return []StorageCapabilities{ | ||||||||
{rwx, block}, | ||||||||
{rwo, block}, | ||||||||
{rwo, file}, | ||||||||
{rox, block}, | ||||||||
} | ||||||||
} | ||||||||
|
||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just added
getFSType
func for vSphere in the last push