Documentation ¶
Overview ¶
Package ibmcsidriver ...
Package ibmcsidriver ...
Package ibmcsidriver ...
Package ibmcsidriver ...
Package ibmcsidriver ...
Package ibmcsidriver ...
Package ibmcsidriver ...
Package ibmcsidriver ...
Package ibmcsidriver ...
Index ¶
- Constants
- Variables
- func WatchClusterConfigMap(client rest.Interface, log *zap.Logger)
- 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) 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 ConfigWatcher
- 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
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" // DP2Profile ... DP2Profile = "dp2" // 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" // NFSServerPath ... NFSServerPath = "nfsServerPath" // AccessPointID ... AccessPointID = "accessPointID" // IOPSLabel ... IOPSLabel = "iops" // ZoneLabel ... ZoneLabel = "zone" // Generation ... just for backward compatibility Generation = "generation" // UID ... UID = "uid" // GID ... GID = "gid" // SecurityGroup SecurityGroup = "security_group" // VPC VPC = "vpc" // IsENIEnabled IsENIEnabled = "isENIEnabled" // SecurityGroupIDs SecurityGroupIDs = "securityGroupIDs" // PrimaryIPId PrimaryIPID = "primaryIPID" // PrimaryIPAddress PrimaryIPAddress = "primaryIPAddress" // SubnetID SubnetID = "subnetID" // ConfigmapName ConfigmapName = "ibm-cloud-provider-data" // ConfigmapNamespace ConfigmapNamespace = "kube-system" // ConfigmapDataKey ConfigmapDataKey = "vpc_subnet_ids" )
const (
// PublishInfoRequestID ...
PublishInfoRequestID = "request-id"
)
Variables ¶
var SupportedFS = []string{"nfs"}
SupportedFS the supported FS types
var SupportedProfile = []string{"dp2"}
SupportedProfile the supported profile names
Functions ¶
Types ¶
type CSIControllerServer ¶
type CSIControllerServer struct { Driver *IBMCSIDriver CSIProvider cloudProvider.CloudProviderInterface }
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 ...
ControllerExpandVolume is responsible for upsizing the file share.
It takes ControllerExpandVolumeRequest as input and creates a provider session to invoke ExpandVolumeRequest cal from provider-library. The function returns a csi ControllerExpandVolumeResponse if successful and error otherwise.
func (*CSIControllerServer) ControllerGetCapabilities ¶
func (csiCS *CSIControllerServer) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
ControllerGetCapabilities allows kubernetes to check the supported capabilities of controller service provided by the Plugin
func (*CSIControllerServer) ControllerGetVolume ¶
func (csiCS *CSIControllerServer) ControllerGetVolume(ctx context.Context, req *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
ControllerGetVolume ...
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 ...
CreateVolume is responsible for creating file share and file share-targets.
It takes the csi createVolumeRequest as input and populates the provider volume. It then creates a provider session to invoke the CreateVolume first and then CreateVolumeAccessPoint call from provider-library. The function returns a csi CreateVolumeResponse if successful and error otherwise.
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 ...
DeleteVolume is responsible for deleting file share-targets and file share.
It takes the csi deleteVolumeRequest as input and creates a provider session to invoke DeleteVolumeAccessPoint first and then DeleteVolume call from provider-library. The function returns a csi DeleteVolumeResponse if successful and error otherwise.
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 is responsible for returning the information about all the volumes that it knows about.
func (*CSIControllerServer) ValidateVolumeCapabilities ¶
func (csiCS *CSIControllerServer) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
ValidateVolumeCapabilities ...
ValidateVolumeCapabilities is responsible to check if a pre-provisioned volume has all the capabilities that the CO wants.
This RPC call SHALL return confirmed only if all the volume capabilities specified in the request are supported.
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 ConfigWatcher ¶
type ConfigWatcher struct {
// contains filtered or unexported fields
}
func NewConfigWatcher ¶
func NewConfigWatcher(client rest.Interface, log *zap.Logger) *ConfigWatcher
func (*ConfigWatcher) Start ¶
func (cw *ConfigWatcher) Start()
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, 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) IsDevicePathNotExist(devicePath string) bool }
StatsUtils ...
type VolumeStatUtils ¶
type VolumeStatUtils struct { }
VolumeStatUtils ...
func (*VolumeStatUtils) IsDevicePathNotExist ¶
func (su *VolumeStatUtils) IsDevicePathNotExist(devicePath string) bool
IsDevicePathNotExist ...