Documentation ¶
Overview ¶
Package ibmcsidriver ...
Package ibmcsidriver ...
Package ibmcsidriver ...
Package ibmcsidriver ...
Package ibmcsidriver ...
Package ibmcsidriver ...
Package ibmcsidriver ...
Package ibmcsidriver ...
Package ibmcsidriver ...
Index ¶
- Constants
- Variables
- type CSIControllerServer
- func (csiCS *CSIControllerServer) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
- func (csiCS *CSIControllerServer) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
- func (csiCS *CSIControllerServer) ControllerGetVolume(ctx context.Context, req *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
- func (csiCS *CSIControllerServer) ControllerModifyVolume(ctx context.Context, req *csi.ControllerModifyVolumeRequest) (*csi.ControllerModifyVolumeResponse, error)
- func (csiCS *CSIControllerServer) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
- func (csiCS *CSIControllerServer) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
- func (csiCS *CSIControllerServer) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
- func (csiCS *CSIControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (csiCS *CSIControllerServer) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
- func (csiCS *CSIControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (csiCS *CSIControllerServer) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
- func (csiCS *CSIControllerServer) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
- func (csiCS *CSIControllerServer) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
- func (csiCS *CSIControllerServer) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
- type CSIIdentityServer
- func (csiIdentity *CSIIdentityServer) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
- func (csiIdentity *CSIIdentityServer) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
- func (csiIdentity *CSIIdentityServer) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
- type CSINodeServer
- func (csiNS *CSINodeServer) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
- func (csiNS *CSINodeServer) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
- func (csiNS *CSINodeServer) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
- func (csiNS *CSINodeServer) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
- func (csiNS *CSINodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
- func (csiNS *CSINodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
- func (csiNS *CSINodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
- func (csiNS *CSINodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
- type IBMCSIDriver
- func (icDriver *IBMCSIDriver) AddControllerServiceCapabilities(cl []csi.ControllerServiceCapability_RPC_Type) error
- func (icDriver *IBMCSIDriver) AddNodeServiceCapabilities(nl []csi.NodeServiceCapability_RPC_Type) error
- func (icDriver *IBMCSIDriver) AddVolumeCapabilityAccessModes(vc []csi.VolumeCapability_AccessMode_Mode) error
- func (icDriver *IBMCSIDriver) Run(endpoint string)
- func (icDriver *IBMCSIDriver) SetupIBMCSIDriver(provider cloudProvider.CloudProviderInterface, mounter mountManager.Mounter, ...) error
- type NonBlockingGRPCServer
- type StatsUtils
- type VolumeMountUtils
- type VolumeStatUtils
- func (su *VolumeStatUtils) DeviceInfo(devicePath string) (int64, error)
- func (su *VolumeStatUtils) FSInfo(path string) (int64, int64, int64, int64, int64, int64, error)
- func (su *VolumeStatUtils) IsBlockDevice(devicePath string) (bool, error)
- func (su *VolumeStatUtils) IsDevicePathNotExist(devicePath string) bool
Constants ¶
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" // SDPProfile ... SDPProfile = "sdp" // 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 // MinimumSDPVolumeSizeInBytes ... This is minimum size require for sdp (acadia profile) MinimumSDPVolumeSizeInBytes int64 = 1 * utils.GiB )
const ( // PublishInfoVolumeID ... PublishInfoVolumeID = "volume-id" // PublishInfoNodeID ... PublishInfoNodeID = "node-id" // PublishInfoStatus ... PublishInfoStatus = "attach-status" // PublishInfoDevicePath ... PublishInfoDevicePath = "device-path" // PublishInfoRequestID ... PublishInfoRequestID = "request-id" )
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 ¶
var SupportedFS = []string{"ext2", "ext3", "ext4", "xfs"}
SupportedFS the supported FS types
var SupportedProfile = []string{"custom", "general-purpose", "5iops-tier", "10iops-tier", "sdp"}
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 ¶
func (csiCS *CSIControllerServer) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
ControllerExpandVolume ...
func (*CSIControllerServer) ControllerGetCapabilities ¶
func (csiCS *CSIControllerServer) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
ControllerGetCapabilities implements the default GRPC callout.
func (*CSIControllerServer) ControllerGetVolume ¶
func (csiCS *CSIControllerServer) ControllerGetVolume(ctx context.Context, req *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
ControllerGetVolume ...
func (*CSIControllerServer) ControllerModifyVolume ¶
func (csiCS *CSIControllerServer) ControllerModifyVolume(ctx context.Context, req *csi.ControllerModifyVolumeRequest) (*csi.ControllerModifyVolumeResponse, error)
ControllerModifyVolume ...
func (*CSIControllerServer) ControllerPublishVolume ¶
func (csiCS *CSIControllerServer) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
ControllerPublishVolume ...
func (*CSIControllerServer) ControllerUnpublishVolume ¶
func (csiCS *CSIControllerServer) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
ControllerUnpublishVolume ...
func (*CSIControllerServer) CreateSnapshot ¶
func (csiCS *CSIControllerServer) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
CreateSnapshot ...
func (*CSIControllerServer) CreateVolume ¶
func (csiCS *CSIControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
CreateVolume ...
func (*CSIControllerServer) DeleteSnapshot ¶
func (csiCS *CSIControllerServer) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
DeleteSnapshot ...
func (*CSIControllerServer) DeleteVolume ¶
func (csiCS *CSIControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
DeleteVolume ...
func (*CSIControllerServer) GetCapacity ¶
func (csiCS *CSIControllerServer) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
GetCapacity ...
func (*CSIControllerServer) ListSnapshots ¶
func (csiCS *CSIControllerServer) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
ListSnapshots ...
func (*CSIControllerServer) ListVolumes ¶
func (csiCS *CSIControllerServer) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
ListVolumes ...
func (*CSIControllerServer) ValidateVolumeCapabilities ¶
func (csiCS *CSIControllerServer) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
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 ¶
func (csiNS *CSINodeServer) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
NodeExpandVolume ...
func (*CSINodeServer) NodeGetCapabilities ¶
func (csiNS *CSINodeServer) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
NodeGetCapabilities ...
func (*CSINodeServer) NodeGetInfo ¶
func (csiNS *CSINodeServer) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
NodeGetInfo ...
func (*CSINodeServer) NodeGetVolumeStats ¶
func (csiNS *CSINodeServer) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
NodeGetVolumeStats ...
func (*CSINodeServer) NodePublishVolume ¶
func (csiNS *CSINodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
NodePublishVolume ...
func (*CSINodeServer) NodeStageVolume ¶
func (csiNS *CSINodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
NodeStageVolume ...
func (*CSINodeServer) NodeUnpublishVolume ¶
func (csiNS *CSINodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
NodeUnpublishVolume ...
func (*CSINodeServer) NodeUnstageVolume ¶
func (csiNS *CSINodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
NodeUnstageVolume ...
type IBMCSIDriver ¶
type IBMCSIDriver struct {
// contains filtered or unexported fields
}
IBMCSIDriver ...
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) 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 VolumeStatUtils ¶
type VolumeStatUtils struct { }
VolumeStatUtils ...
func (*VolumeStatUtils) DeviceInfo ¶
func (su *VolumeStatUtils) DeviceInfo(devicePath string) (int64, error)
DeviceInfo ...
func (*VolumeStatUtils) IsBlockDevice ¶
func (su *VolumeStatUtils) IsBlockDevice(devicePath string) (bool, error)
IsBlockDevice ...
func (*VolumeStatUtils) IsDevicePathNotExist ¶
func (su *VolumeStatUtils) IsDevicePathNotExist(devicePath string) bool
IsDevicePathNotExist ...