driver

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
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

SupportedVolumeCapabilityAccessModes contains the list of supported access modes for the volume

View Source
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

func IsUnmountRequired(volumeID, targetPath string) (bool, error)

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

func VerifyIfMountRequired(volumeID, targetPath string) (bool, error)

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

func New

func New(config *config.Config) *CSIDriver

New returns a new driver instance

func (*CSIDriver) Run

func (d *CSIDriver) Run() error

Run starts the CSI plugin by communicating over the given endpoint

type VolumeStatistics

type VolumeStatistics struct {
	// contains filtered or unexported fields
}

VolumeStatistics represents statistics information of a volume

Jump to

Keyboard shortcuts

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