Documentation ¶
Index ¶
- Constants
- Variables
- func GetVolumeCapabilityAccessModes() []*csi.VolumeCapability_AccessMode
- func IsSupportedVolumeCapabilityAccessMode(accessMode csi.VolumeCapability_AccessMode_Mode) bool
- func IsUnmountRequired(volumeID, targetPath string) (bool, error)
- func NewController(d *CSIDriver) csi.ControllerServer
- func NewIdentity(d *CSIDriver) csi.IdentityServer
- func NewNode(d *CSIDriver) csi.NodeServer
- func VerifyIfMountRequired(volumeID, targetPath string) (bool, error)
- type CSIDriver
- type VolumeStatistics
Constants ¶
const ( // FSTypeExt2 represents the ext2 filesystem type FSTypeExt2 = "ext2" // FSTypeExt3 represents the ext3 filesystem type FSTypeExt3 = "ext3" // FSTypeExt4 represents the ext4 filesystem type FSTypeExt4 = "ext4" // FSTypeXfs represents te xfs filesystem type FSTypeXfs = "xfs" MaxRetryCount = 10 // TopologyNodeKey is a key of topology that represents node name. TopologyNodeKey = "topology.cstor.openebs.io/nodeName" )
const ( // Name of this csi driver that is understood // by Kubernetes and the CSI system // // This is the canonical, official name of this // plugin Name = "cstor.csi.openebs.io" )
Variables ¶
var SupportedVolumeCapabilityAccessModes = []*csi.VolumeCapability_AccessMode{ &csi.VolumeCapability_AccessMode{ Mode: csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER, }, }
SupportedVolumeCapabilityAccessModes contains the list of supported access modes for the volume
var (
ValidFSTypes = []string{FSTypeExt4, FSTypeXfs}
)
Functions ¶
func GetVolumeCapabilityAccessModes ¶
func GetVolumeCapabilityAccessModes() []*csi.VolumeCapability_AccessMode
GetVolumeCapabilityAccessModes fetches the access modes on which the volume can be exposed
func IsSupportedVolumeCapabilityAccessMode ¶
func IsSupportedVolumeCapabilityAccessMode( accessMode csi.VolumeCapability_AccessMode_Mode, ) bool
IsSupportedVolumeCapabilityAccessMode valides the requested access mode
func IsUnmountRequired ¶
IsUnmountRequired returns true if the volume needs to be unmounted
func NewController ¶
func NewController(d *CSIDriver) csi.ControllerServer
NewController returns a new instance of CSI controller
func NewIdentity ¶
func NewIdentity(d *CSIDriver) csi.IdentityServer
NewIdentity returns a new instance of CSI IdentityServer
func NewNode ¶
func NewNode(d *CSIDriver) csi.NodeServer
NewNode returns a new instance of CSI NodeServer
func VerifyIfMountRequired ¶
VerifyIfMountRequired returns true if volume is already mounted on targetPath and unmounts if it is mounted on a different path
Types ¶
type CSIDriver ¶
type CSIDriver struct {
// contains filtered or unexported fields
}
TODO check if this can be renamed to Base
CSIDriver defines a common data structure for drivers
type VolumeStatistics ¶
type VolumeStatistics struct {
// contains filtered or unexported fields
}
VolumeStatistics represents statistics information of a volume