Documentation ¶
Index ¶
- Constants
- Variables
- func CreateLVMVolume(ctx context.Context, req *csi.CreateVolumeRequest, params *VolumeParams) (*lvmapi.LVMVolume, error)
- func GetVolAndMountInfo(req *csi.NodePublishVolumeRequest) (*apis.LVMVolume, *lvm.MountInfo, error)
- func GetVolumeCapabilityAccessModes() []*csi.VolumeCapability_AccessMode
- func IsSupportedVolumeCapabilityAccessMode(accessMode csi.VolumeCapability_AccessMode_Mode) bool
- func LabelIndexFunc(label string) cache.IndexFunc
- func LabelIndexName(label string) string
- func NewController(d *CSIDriver) csi.ControllerServer
- func NewIdentity(d *CSIDriver) csi.IdentityServer
- func NewNode(d *CSIDriver) csi.NodeServer
- type CSIDriver
- type NonBlockingGRPCServer
- type SnapshotParams
- type VolumeParams
Constants ¶
const ( MB = 1000 * 1000 GB = 1000 * 1000 * 1000 Mi = 1024 * 1024 Gi = 1024 * 1024 * 1024 // Ping event is sent periodically Ping string = "lvm-ping" // Heartbeat message. Heartbeat string = "lvm-heartbeat" // DefaultCASType Event application name constant for volume event DefaultCASType string = "lvm-localpv" // LocalPVReplicaCount is the constant used by usage to represent replication factor in LocalPV LocalPVReplicaCount string = "1" )
size constants
const ( // pick the node where less volumes are provisioned for the given volume group VolumeWeighted = "VolumeWeighted" // pick the node where total provisioned volumes have occupied less capacity from the given volume group CapacityWeighted = "CapacityWeighted" // pick the node which is less loaded space wise // this will be the default scheduler when none provided SpaceWeighted = "SpaceWeighted" )
scheduling algorithm constants
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
Functions ¶
func CreateLVMVolume ¶
func CreateLVMVolume(ctx context.Context, req *csi.CreateVolumeRequest, params *VolumeParams) (*lvmapi.LVMVolume, error)
CreateLVMVolume create new lvm volume for csi volume request
func GetVolAndMountInfo ¶
func GetVolAndMountInfo( req *csi.NodePublishVolumeRequest, ) (*apis.LVMVolume, *lvm.MountInfo, error)
GetVolAndMountInfo get volume and mount info from node csi volume request
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 LabelIndexFunc ¶ added in v0.3.0
LabelIndexFunc defines index values for given label.
func LabelIndexName ¶ added in v0.3.0
LabelIndexName add prefix for label index.
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
Types ¶
type CSIDriver ¶
type CSIDriver struct {
// contains filtered or unexported fields
}
CSIDriver defines a common data structure for drivers TODO check if this can be renamed to Base
type NonBlockingGRPCServer ¶
type NonBlockingGRPCServer interface { // Start services at the endpoint Start() // Waits for the service to stop Wait() // Stops the service gracefully Stop() // Stops the service forcefully ForceStop() }
NonBlockingGRPCServer defines Non blocking GRPC server interfaces
func NewNonBlockingGRPCServer ¶
func NewNonBlockingGRPCServer(ep string, ids csi.IdentityServer, cs csi.ControllerServer, ns csi.NodeServer) NonBlockingGRPCServer
NewNonBlockingGRPCServer returns a new instance of NonBlockingGRPCServer
type SnapshotParams ¶ added in v0.7.0
SnapshotParams holds collection of supported settings that can be configured in snapshot class.
func NewSnapshotParams ¶ added in v0.7.0
func NewSnapshotParams(m map[string]string) (*SnapshotParams, error)
NewSnapshotParams parses the input params and instantiates new SnapshotParams.
type VolumeParams ¶ added in v0.3.0
type VolumeParams struct { // VgPattern specifies vg regex to use for // provisioning logical volumes. VgPattern *regexp.Regexp Scheduler string ThinProvision string // extra optional metadata passed by external provisioner // if enabled. See --extra-create-metadata flag for more details. // https://github.com/kubernetes-csi/external-provisioner#recommended-optional-arguments PVCName string PVCNamespace string PVName string }
VolumeParams holds collection of supported settings that can be configured in storage class.
func NewVolumeParams ¶ added in v0.3.0
func NewVolumeParams(m map[string]string) (*VolumeParams, error)
NewVolumeParams parses the input params and instantiates new VolumeParams.