Documentation ¶
Index ¶
- Constants
- Variables
- func GetClientFromCacheOrCreate() (*kubernetes.Clientset, error)
- func GetNodeIP(node *v1.Node, nodeID string) (net.IP, error)
- func GetVolumeCapabilityAccessModes() []*csi.VolumeCapability_AccessMode
- func IsSupportedVolumeCapabilityAccessMode(accessMode csi.VolumeCapability_AccessMode_Mode) bool
- func NewController(d *CSIDriver) *controller
- func NewIdentity(d *CSIDriver) csi.IdentityServer
- func NewNodeServer(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 AnnoSelectedNode = "volume.kubernetes.io/selected-node" KubernetesNodeIdentityKey = "kubernetes.io/hostname" VolumeGroupName = "csi.io/volume-group-name" )
size constants
const (
MPName = "MountPoint"
)
Variables ¶
var ClientSet *kubernetes.Clientset
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 GetClientFromCacheOrCreate ¶
func GetClientFromCacheOrCreate() (*kubernetes.Clientset, error)
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 NewController ¶
func NewController(d *CSIDriver) *controller
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 NewNodeServer ¶
func NewNodeServer(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, gs csi.GroupControllerServer) NonBlockingGRPCServer
NewNonBlockingGRPCServer returns a new instance of NonBlockingGRPCServer
type SnapshotParams ¶
SnapshotParams holds collection of supported settings that can be configured in snapshot class.
func NewSnapshotParams ¶
func NewSnapshotParams(m map[string]string) (*SnapshotParams, error)
NewSnapshotParams parses the input params and instantiates new SnapshotParams.
type VolumeParams ¶
type VolumeParams struct { PvcName string PvcNamespace string PvName string // HostPath specifies hostpath to use for // provisioning logical volumes. HostPath string }
VolumeParams holds collection of supported settings that can be configured in storage class.
func NewVolumeParams ¶
func NewVolumeParams(m map[string]string) (*VolumeParams, error)
NewVolumeParams parses the input params and instantiates new VolumeParams.