Documentation ¶
Index ¶
- Constants
- Variables
- func IsBlockVolume(volumeCapabilities []*csi.VolumeCapability) (bool, error)
- func NewControllerService(driver *VCDDriver, vcdClient *vcdsdk.Client, clusterID string, vAppName string, ...) csi.ControllerServer
- func NewIdentityServer(driver *VCDDriver) csi.IdentityServer
- func NewNodeService(driver *VCDDriver, nodeID string) csi.NodeServer
- type VCDDriver
Constants ¶
View Source
const ( MbToBytes = int64(1024 * 1024) GbToBytes = int64(1024 * 1024 * 1024) DefaultDiskSizeInGb = int64(1) )
View Source
const ( BusTypeParameter = "busType" BusSubTypeParameter = "busSubType" StorageProfileParameter = "storageProfile" ZoneNameParameter = "zoneName" FileSystemParameter = "filesystem" EphemeralVolumeContext = "csi.storage.k8s.io/ephemeral" DiskIDAttribute = "diskID" VMFullNameAttribute = "vmID" DiskUUIDAttribute = "diskUUID" FileSystemAttribute = "filesystem" )
View Source
const ( DevDiskPath = "/dev/disk/by-path" ScsiHostPath = "/sys/class/scsi_host" HostNameRegexPattern = "^host[0-9]+" ScsiBlockPathPrefix = "/sys/class/block" ScsiBlockPathSuffix = "device/rescan" )
View Source
const (
// Name is the name of this CSI plugin.
Name = "named-disk.csi.cloud-director.vmware.com"
)
Variables ¶
View Source
var ( VolumeCapabilityAccessModesList = []csi.VolumeCapability_AccessMode_Mode{ csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER, csi.VolumeCapability_AccessMode_SINGLE_NODE_READER_ONLY, csi.VolumeCapability_AccessMode_MULTI_NODE_READER_ONLY, csi.VolumeCapability_AccessMode_MULTI_NODE_SINGLE_WRITER, csi.VolumeCapability_AccessMode_MULTI_NODE_MULTI_WRITER, } // VolumeCapabilityAccessModesStringMap is a cache for available VolumeCapabilityAccessModesList. This is later // referenced in CreateVolume of the controller service. VolumeCapabilityAccessModesStringMap = make(map[string]bool) )
View Source
var ( // BusTypesFromValues is a map of different possible BusTypes from id to string BusTypesFromValues = map[string]string{ "5": "IDE", "6": "SCSI", "20": "SATA", } )
Functions ¶
func IsBlockVolume ¶
func IsBlockVolume(volumeCapabilities []*csi.VolumeCapability) (bool, error)
func NewControllerService ¶
func NewControllerService(driver *VCDDriver, vcdClient *vcdsdk.Client, clusterID string, vAppName string, isZoneEnabledCluster bool, zm *vcdsdk.ZoneMap) csi.ControllerServer
NewControllerService creates a controllerService
func NewIdentityServer ¶
func NewIdentityServer(driver *VCDDriver) csi.IdentityServer
NewIdentityServer will create a new csi.IdentityServer with driver
func NewNodeService ¶
func NewNodeService(driver *VCDDriver, nodeID string) csi.NodeServer
NewNodeService creates and returns a NodeService struct.
Types ¶
type VCDDriver ¶
type VCDDriver struct {
// contains filtered or unexported fields
}
VCDDriver is the main controller of the csi-plugin
func (*VCDDriver) Run ¶
Run will start driver gRPC server to communicated with Kubernetes and register controller, node and identity servers
Click to show internal directories.
Click to hide internal directories.