Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultEndpoint string = "unix://tmp/csi.sock" DefaultDriverName string = "local.csi.kubeservice.cn" DefaultEphemeralVolumeDataFilePath string = "/var/lib/kubelet/kubeservice-volumes.json" // connection timeout DefaultConnectTimeout = 3 // VolumeOperationAlreadyExists is message fmt returned to CO when there is another in-flight call on the given volumeID VolumeOperationAlreadyExists = "An operation with the given volume=%q is already in progress" // VgNameTag is the vg name tag VgNameTag = "vgName" // VolumeTypeTag is the pv type tag VolumeTypeTag = "volumeType" // PvTypeTag is the pv type tag PvTypeTag = "pvType" // FsTypeTag is the fs type tag FsTypeTag = "fsType" // LvmTypeTag is the lvm type tag LvmTypeTag = "lvmType" // NodeAffinity is the pv node schedule tag NodeAffinity = "nodeAffinity" // DefaultFs default fs DefaultFs = "ext4" // DefaultNodeAffinity default NodeAffinity DefaultNodeAffinity = "true" // LinearType linear type LinearType = "linear" // DirectTag is direct-assigned volume tag DirectTag = "direct" // StripingType striping type StripingType = "striping" )
Variables ¶
View Source
var ( VolumeCaps = []csi.VolumeCapability_AccessMode_Mode{ csi.VolumeCapability_AccessMode_SINGLE_NODE_WRITER, } // controllerCaps represents the capability of controller service ControllerCaps = []csi.ControllerServiceCapability_RPC_Type{ csi.ControllerServiceCapability_RPC_CREATE_DELETE_VOLUME, csi.ControllerServiceCapability_RPC_CREATE_DELETE_SNAPSHOT, csi.ControllerServiceCapability_RPC_EXPAND_VOLUME, } NodeCaps = []*csi.NodeServiceCapability{ { Type: &csi.NodeServiceCapability_Rpc{ Rpc: &csi.NodeServiceCapability_RPC{ Type: csi.NodeServiceCapability_RPC_STAGE_UNSTAGE_VOLUME, }, }, }, { Type: &csi.NodeServiceCapability_Rpc{ Rpc: &csi.NodeServiceCapability_RPC{ Type: csi.NodeServiceCapability_RPC_EXPAND_VOLUME, }, }, }, { Type: &csi.NodeServiceCapability_Rpc{ Rpc: &csi.NodeServiceCapability_RPC{ Type: csi.NodeServiceCapability_RPC_GET_VOLUME_STATS, }, }, }, } )
type CSIPlugin struct { *nodeServer *controllerServer srv *grpc.Server options *driverOptions }
Functions ¶
This section is empty.
Types ¶
type ExecRunner ¶
type ExecRunner interface { Remove(name string) error Stat(name string) (os.FileInfo, error) MkdirAll(path string, perm os.FileMode) error RunCommand(cmd string) (string, error) IsBlockDevice(fullPath string) (bool, error) MountBlock(source, target string, opts ...string) error EnsureBlock(target string) error CleanupMountPoint(mountPath string, mounter mountutils.Interface, extensiveMountPointCheck bool) error ResizeFS(devicePath string, deviceMountPath string) (bool, error) }
func NewExecRunner ¶
func NewExecRunner() ExecRunner
func NewFakeExecRunner ¶
func NewFakeExecRunner() ExecRunner
type PvcPodSchedulerMap ¶
type PvcPodSchedulerMap struct {
// contains filtered or unexported fields
}
func (*PvcPodSchedulerMap) Add ¶
func (infoMap *PvcPodSchedulerMap) Add(pvcNamespace, pvcName, schedulerName string)
func (*PvcPodSchedulerMap) Get ¶
func (infoMap *PvcPodSchedulerMap) Get(pvcNamespace, pvcName string) string
func (*PvcPodSchedulerMap) Remove ¶
func (infoMap *PvcPodSchedulerMap) Remove(pvcNamespace, pvcName string)
type SchedulerArch ¶
type SchedulerArch string
var ( SchedulerArchExtender SchedulerArch = "extender" SchedulerArchFramework SchedulerArch = "scheduling-framework" SchedulerArchUnknown SchedulerArch = "unknown" )
type SchedulerArchMap ¶
type SchedulerArchMap struct {
// contains filtered or unexported fields
}
func (*SchedulerArchMap) Get ¶
func (archMap *SchedulerArchMap) Get(schedulerName string) SchedulerArch
Click to show internal directories.
Click to hide internal directories.