ibmcsidriver

package
v0.0.0-...-fe7de7b Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Overview

Package ibmcsidriver ...

Package ibmcsidriver ...

Package ibmcsidriver ...

Package ibmcsidriver ...

Package ibmcsidriver ...

Package ibmcsidriver ...

Package ibmcsidriver ...

Package ibmcsidriver ...

Index

Constants

View Source
const (
	// Profile ...
	Profile = "profile"

	// IopsPerGB ...
	IopsPerGB = "iopsPerGB"

	//SizeIopsRange ...
	SizeIopsRange = "sizeIOPSRange"

	// IOPS per PVC
	IOPS = "iops"

	// SizeRangeSupported ...
	SizeRangeSupported = "sizeRange"

	// BillingType ...
	BillingType = "billingType"

	// Encrypted ..
	Encrypted = "encrypted"

	// EncryptionKey ...
	EncryptionKey = "encryptionKey"

	// ResourceGroup ...
	ResourceGroup = "resourceGroup"

	// Zone ...
	Zone = "zone"

	// Region ...
	Region = "region"

	// Tag ...
	Tag = "tags"

	// CustomProfile ...
	CustomProfile = "custom"

	// ClassVersion ...
	ClassVersion = "classVersion"

	// TrueStr ...
	TrueStr = "true"

	// FalseStr ...
	FalseStr = "false"

	// EncryptionKeyMaxLen Max length of the CRN key in Chars
	EncryptionKeyMaxLen = 256

	// ProfileNameMaxLen Max length of the profile name in Chars
	// maxLength: 63 minLength: 1 pattern: ^([a-z]|[a-z][-a-z0-9]*[a-z0-9])$
	ProfileNameMaxLen = 63

	// ResourceGroupIDMaxLen Max length of the resource group id in Chars
	// pattern: ^[0-9a-f]{32}$
	ResourceGroupIDMaxLen = 32

	// TagMaxLen Max size of tag in Chars
	// The maximum size of a tag is 128 characters.
	// The permitted characters are A-Z, 0-9, white space, underscore, hyphen,
	// period, and colon, and tags are case-insensitive.
	TagMaxLen = 128

	// ZoneNameMaxLen Max length of the Zone Name in Chars
	// maxLength: 63 minLength: 1 pattern: ^([a-z]|[a-z][-a-z0-9]*[a-z0-9])$
	ZoneNameMaxLen = 63

	// RegionMaxLen urrently same as zone
	RegionMaxLen = ZoneNameMaxLen

	// VolumeIDLabel ...
	VolumeIDLabel = "volumeId"

	// VolumeCRNLabel ...
	VolumeCRNLabel = "volumeCRN"

	// ClusterIDLabel ...
	ClusterIDLabel = "clusterID"

	// IOPSLabel ...
	IOPSLabel = "iops"

	// ZoneLabel ...
	ZoneLabel = "zone"

	// Generation ... just for backward compatibility
	Generation = "generation"

	// DEFAULT_SNAPSHOT_CREATE_DELAY ...
	DEFAULT_SNAPSHOT_CREATE_DELAY = 300 //300 seconds

	// MAX_SNAPSHOT_CREATE_DELAY ... This is max timeout value for csi-snapshotter
	MAX_SNAPSHOT_CREATE_DELAY = 900 //900 seconds
)
View Source
const (
	// PublishInfoVolumeID ...
	PublishInfoVolumeID = "volume-id"

	// PublishInfoNodeID ...
	PublishInfoNodeID = "node-id"

	// PublishInfoStatus ...
	PublishInfoStatus = "attach-status"

	// PublishInfoDevicePath ...
	PublishInfoDevicePath = "device-path"

	// PublishInfoRequestID ...
	PublishInfoRequestID = "request-id"
)
View Source
const (
	// DefaultVolumesPerNode is the default number of volumes attachable to a node
	DefaultVolumesPerNode = 12

	// MinimumCoresWithMaximumAttachableVolumes is the minimum cores required to have maximum number of attachable volumes, currently 4 as per the docs.
	MinimumCoresWithMaximumAttachableVolumes = 4

	// 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"
)

Variables

View Source
var SupportedFS = []string{"ext2", "ext3", "ext4", "xfs"}

SupportedFS the supported FS types

View Source
var SupportedProfile = []string{"custom", "general-purpose", "5iops-tier", "10iops-tier"}

SupportedProfile the supported profile names

Functions

This section is empty.

Types

type CSIControllerServer

type CSIControllerServer struct {
	Driver      *IBMCSIDriver
	CSIProvider cloudProvider.CloudProviderInterface
	// contains filtered or unexported fields
}

CSIControllerServer ...

func NewControllerServer

func NewControllerServer(icDriver *IBMCSIDriver, provider cloudProvider.CloudProviderInterface) *CSIControllerServer

NewControllerServer ...

func (*CSIControllerServer) ControllerExpandVolume

ControllerExpandVolume ...

func (*CSIControllerServer) ControllerGetCapabilities

ControllerGetCapabilities implements the default GRPC callout.

func (*CSIControllerServer) ControllerGetVolume

ControllerGetVolume ...

func (*CSIControllerServer) ControllerPublishVolume

ControllerPublishVolume ...

func (*CSIControllerServer) ControllerUnpublishVolume

ControllerUnpublishVolume ...

func (*CSIControllerServer) CreateSnapshot

CreateSnapshot ...

func (*CSIControllerServer) CreateVolume

CreateVolume ...

func (*CSIControllerServer) DeleteSnapshot

DeleteSnapshot ...

func (*CSIControllerServer) DeleteVolume

DeleteVolume ...

func (*CSIControllerServer) GetCapacity

GetCapacity ...

func (*CSIControllerServer) ListSnapshots

ListSnapshots ...

func (*CSIControllerServer) ListVolumes

ListVolumes ...

func (*CSIControllerServer) ValidateVolumeCapabilities

ValidateVolumeCapabilities ...

type CSIIdentityServer

type CSIIdentityServer struct {
	Driver *IBMCSIDriver
}

CSIIdentityServer ...

func NewIdentityServer

func NewIdentityServer(icDriver *IBMCSIDriver) *CSIIdentityServer

NewIdentityServer ...

func (*CSIIdentityServer) GetPluginCapabilities

func (csiIdentity *CSIIdentityServer) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)

GetPluginCapabilities ...

func (*CSIIdentityServer) GetPluginInfo

func (csiIdentity *CSIIdentityServer) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)

GetPluginInfo ...

func (*CSIIdentityServer) Probe

func (csiIdentity *CSIIdentityServer) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)

Probe ...

type CSINodeServer

type CSINodeServer struct {
	Driver   *IBMCSIDriver
	Mounter  mountmanager.Mounter
	Metadata nodeMetadata.NodeMetadata
	Stats    StatsUtils
	// contains filtered or unexported fields
}

CSINodeServer ...

func NewNodeServer

func NewNodeServer(icDriver *IBMCSIDriver, mounter mountManager.Mounter, statsUtil StatsUtils, nodeMetadata nodeMetadata.NodeMetadata) *CSINodeServer

NewNodeServer ...

func (*CSINodeServer) NodeExpandVolume

NodeExpandVolume ...

func (*CSINodeServer) NodeGetCapabilities

NodeGetCapabilities ...

func (*CSINodeServer) NodeGetInfo

func (csiNS *CSINodeServer) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)

NodeGetInfo ...

func (*CSINodeServer) NodeGetVolumeStats

NodeGetVolumeStats ...

func (*CSINodeServer) NodePublishVolume

NodePublishVolume ...

func (*CSINodeServer) NodeStageVolume

NodeStageVolume ...

func (*CSINodeServer) NodeUnpublishVolume

NodeUnpublishVolume ...

func (*CSINodeServer) NodeUnstageVolume

NodeUnstageVolume ...

type IBMCSIDriver

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

IBMCSIDriver ...

func GetIBMCSIDriver

func GetIBMCSIDriver() *IBMCSIDriver

GetIBMCSIDriver ...

func (*IBMCSIDriver) AddControllerServiceCapabilities

func (icDriver *IBMCSIDriver) AddControllerServiceCapabilities(cl []csi.ControllerServiceCapability_RPC_Type) error

AddControllerServiceCapabilities ...

func (*IBMCSIDriver) AddNodeServiceCapabilities

func (icDriver *IBMCSIDriver) AddNodeServiceCapabilities(nl []csi.NodeServiceCapability_RPC_Type) error

AddNodeServiceCapabilities ...

func (*IBMCSIDriver) AddVolumeCapabilityAccessModes

func (icDriver *IBMCSIDriver) AddVolumeCapabilityAccessModes(vc []csi.VolumeCapability_AccessMode_Mode) error

AddVolumeCapabilityAccessModes ...

func (*IBMCSIDriver) Run

func (icDriver *IBMCSIDriver) Run(endpoint string)

Run ...

func (*IBMCSIDriver) SetupIBMCSIDriver

func (icDriver *IBMCSIDriver) SetupIBMCSIDriver(provider cloudProvider.CloudProviderInterface, mounter mountManager.Mounter, statsUtil StatsUtils, metadata nodeMetadata.NodeMetadata, nodeInfo nodeMetadata.NodeInfo, lgr *zap.Logger, name, vendorVersion string) error

SetupIBMCSIDriver ...

type NonBlockingGRPCServer

type NonBlockingGRPCServer interface {
	// Start services at the endpoint
	Start(endpoint string, ids csi.IdentityServer, cs csi.ControllerServer, ns csi.NodeServer)
	// 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(logger *zap.Logger) NonBlockingGRPCServer

NewNonBlockingGRPCServer ...

type StatsUtils

type StatsUtils interface {
	FSInfo(path string) (int64, int64, int64, int64, int64, int64, error)
	IsBlockDevice(devicePath string) (bool, error)
	DeviceInfo(devicePath string) (int64, error)
	IsDevicePathNotExist(devicePath string) bool
}

StatsUtils ...

type VolumeMountUtils

type VolumeMountUtils struct {
}

VolumeMountUtils ...

type VolumeStatUtils

type VolumeStatUtils struct {
}

VolumeStatUtils ...

func (*VolumeStatUtils) DeviceInfo

func (su *VolumeStatUtils) DeviceInfo(devicePath string) (int64, error)

DeviceInfo ...

func (*VolumeStatUtils) FSInfo

func (su *VolumeStatUtils) FSInfo(path string) (int64, int64, int64, int64, int64, int64, error)

FSInfo ...

func (*VolumeStatUtils) IsBlockDevice

func (su *VolumeStatUtils) IsBlockDevice(devicePath string) (bool, error)

IsBlockDevice ...

func (*VolumeStatUtils) IsDevicePathNotExist

func (su *VolumeStatUtils) IsDevicePathNotExist(devicePath string) bool

IsDevicePathNotExist ...

Jump to

Keyboard shortcuts

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