Documentation ¶
Overview ¶
Package csi contains the CSI driver implementation
Index ¶
- Constants
- func ParseEndpoint(endpoint string) (string, string, error)
- type ControllerService
- func (d *ControllerService) ControllerExpandVolume(_ context.Context, request *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
- func (d *ControllerService) ControllerGetCapabilities(_ context.Context, request *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
- func (d *ControllerService) ControllerGetVolume(_ context.Context, request *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
- func (d *ControllerService) ControllerModifyVolume(_ context.Context, request *csi.ControllerModifyVolumeRequest) (*csi.ControllerModifyVolumeResponse, error)
- func (d *ControllerService) ControllerPublishVolume(ctx context.Context, request *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
- func (d *ControllerService) ControllerUnpublishVolume(ctx context.Context, request *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
- func (d *ControllerService) CreateSnapshot(_ context.Context, request *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
- func (d *ControllerService) CreateVolume(_ context.Context, request *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (d *ControllerService) DeleteSnapshot(_ context.Context, request *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
- func (d *ControllerService) DeleteVolume(_ context.Context, request *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (d *ControllerService) GetCapacity(_ context.Context, request *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
- func (d *ControllerService) ListSnapshots(_ context.Context, request *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
- func (d *ControllerService) ListVolumes(_ context.Context, request *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
- func (d *ControllerService) ValidateVolumeCapabilities(_ context.Context, request *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
- type IdentityService
- func (d *IdentityService) GetPluginCapabilities(context.Context, *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
- func (d *IdentityService) GetPluginInfo(context.Context, *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
- func (d *IdentityService) Probe(_ context.Context, _ *csi.ProbeRequest) (*csi.ProbeResponse, error)
- type NodeService
- func (n *NodeService) NodeExpandVolume(_ context.Context, request *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
- func (n *NodeService) NodeGetCapabilities(_ context.Context, request *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
- func (n *NodeService) NodeGetInfo(ctx context.Context, request *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
- func (n *NodeService) NodeGetVolumeStats(_ context.Context, request *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
- func (n *NodeService) NodePublishVolume(_ context.Context, request *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
- func (n *NodeService) NodeStageVolume(_ context.Context, request *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
- func (n *NodeService) NodeUnpublishVolume(_ context.Context, request *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
- func (n *NodeService) NodeUnstageVolume(_ context.Context, request *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
Constants ¶
const ( // DriverName is the name of the CSI driver DriverName = "csi.proxmox.sinextra.dev" // DriverVersion is the version of the CSI driver DriverVersion = "0.4.0" // DriverSpecVersion CSI spec version DriverSpecVersion = "1.9.0" // StorageIDKey is the ID of the Proxmox storage StorageIDKey = "storage" // StorageCacheKey is the cache type, can be one of "directsync", "none", "writeback", "writethrough" StorageCacheKey = "cache" // StorageSSDKey is it ssd disk StorageSSDKey = "ssd" // StorageDiskIOPSKey is maximum r/w I/O in operations per second StorageDiskIOPSKey = "diskIOPS" // StorageDiskMBpsKey is maximum r/w throughput in MB/s StorageDiskMBpsKey = "diskMBps" // StorageBlockSizeKey the block size when formatting a volume StorageBlockSizeKey = "blockSize" // StorageInodeSizeKey the inode size when formatting a volume StorageInodeSizeKey = "inodeSize" // MaxVolumesPerNode is the maximum number of volumes that can be attached to a node MaxVolumesPerNode = 24 // MinVolumeSize is the minimum size of a volume MinVolumeSize = 1 // GB // DefaultVolumeSize is the default size of a volume DefaultVolumeSize = 10 // GB // EncryptionPassphraseKey is the encryption passphrase secret key EncryptionPassphraseKey = "encryption-passphrase" )
const ( // FSTypeExt4 represents the ext4 filesystem type FSTypeExt4 = "ext4" // FSTypeXfs represents the xfs filesystem type FSTypeXfs = "xfs" )
constants for fstypes
const ( // TaskStatusCheckInterval is the interval in seconds to check the status of a task TaskStatusCheckInterval = 5 // TaskTimeout is the timeout in seconds for all task TaskTimeout = 30 // ErrorNotFound not found error message ErrorNotFound string = "not found" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ControllerService ¶
type ControllerService struct { Cluster *proxmox.Cluster Kclient clientkubernetes.Interface // contains filtered or unexported fields }
ControllerService is the controller service for the CSI driver
func NewControllerService ¶
func NewControllerService(kclient *clientkubernetes.Clientset, cloudConfig string) (*ControllerService, error)
NewControllerService returns a new controller service
func (*ControllerService) ControllerExpandVolume ¶
func (d *ControllerService) ControllerExpandVolume(_ context.Context, request *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
ControllerExpandVolume expand a volume
func (*ControllerService) ControllerGetCapabilities ¶
func (d *ControllerService) ControllerGetCapabilities(_ context.Context, request *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
ControllerGetCapabilities get controller capabilities.
func (*ControllerService) ControllerGetVolume ¶
func (d *ControllerService) ControllerGetVolume(_ context.Context, request *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
ControllerGetVolume get a volume
func (*ControllerService) ControllerModifyVolume ¶ added in v0.5.0
func (d *ControllerService) ControllerModifyVolume(_ context.Context, request *csi.ControllerModifyVolumeRequest) (*csi.ControllerModifyVolumeResponse, error)
ControllerModifyVolume modify a volume
func (*ControllerService) ControllerPublishVolume ¶
func (d *ControllerService) ControllerPublishVolume(ctx context.Context, request *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
ControllerPublishVolume publish a volume
func (*ControllerService) ControllerUnpublishVolume ¶
func (d *ControllerService) ControllerUnpublishVolume(ctx context.Context, request *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
ControllerUnpublishVolume unpublish a volume
func (*ControllerService) CreateSnapshot ¶
func (d *ControllerService) CreateSnapshot(_ context.Context, request *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
CreateSnapshot create a snapshot
func (*ControllerService) CreateVolume ¶
func (d *ControllerService) CreateVolume(_ context.Context, request *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
CreateVolume creates a volume
func (*ControllerService) DeleteSnapshot ¶
func (d *ControllerService) DeleteSnapshot(_ context.Context, request *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
DeleteSnapshot delete a snapshot
func (*ControllerService) DeleteVolume ¶
func (d *ControllerService) DeleteVolume(_ context.Context, request *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
DeleteVolume deletes a volume.
func (*ControllerService) GetCapacity ¶
func (d *ControllerService) GetCapacity(_ context.Context, request *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
GetCapacity get capacity
func (*ControllerService) ListSnapshots ¶
func (d *ControllerService) ListSnapshots(_ context.Context, request *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
ListSnapshots list snapshots
func (*ControllerService) ListVolumes ¶
func (d *ControllerService) ListVolumes(_ context.Context, request *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
ListVolumes list volumes
func (*ControllerService) ValidateVolumeCapabilities ¶
func (d *ControllerService) ValidateVolumeCapabilities(_ context.Context, request *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
ValidateVolumeCapabilities validate volume capabilities
type IdentityService ¶
type IdentityService struct{}
IdentityService is the identity service for the CSI driver
func NewIdentityService ¶
func NewIdentityService() *IdentityService
NewIdentityService returns a new identity service
func (*IdentityService) GetPluginCapabilities ¶
func (d *IdentityService) GetPluginCapabilities(context.Context, *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
GetPluginCapabilities returns the capabilities of the plugin
func (*IdentityService) GetPluginInfo ¶
func (d *IdentityService) GetPluginInfo(context.Context, *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
GetPluginInfo returns the name and version of the plugin
func (*IdentityService) Probe ¶
func (d *IdentityService) Probe(_ context.Context, _ *csi.ProbeRequest) (*csi.ProbeResponse, error)
Probe returns the health and readiness of the plugin
type NodeService ¶
NodeService is the node service for the CSI driver
func NewNodeService ¶
func NewNodeService(nodeID string, clientSet kubernetes.Interface) *NodeService
NewNodeService returns a new NodeService
func (*NodeService) NodeExpandVolume ¶
func (n *NodeService) NodeExpandVolume(_ context.Context, request *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
NodeExpandVolume expand the volume
func (*NodeService) NodeGetCapabilities ¶
func (n *NodeService) NodeGetCapabilities(_ context.Context, request *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
NodeGetCapabilities get the node capabilities
func (*NodeService) NodeGetInfo ¶
func (n *NodeService) NodeGetInfo(ctx context.Context, request *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
NodeGetInfo get the node info
func (*NodeService) NodeGetVolumeStats ¶
func (n *NodeService) NodeGetVolumeStats(_ context.Context, request *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
NodeGetVolumeStats get the volume stats
func (*NodeService) NodePublishVolume ¶
func (n *NodeService) NodePublishVolume(_ context.Context, request *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
NodePublishVolume mounts the volume on the node.
func (*NodeService) NodeStageVolume ¶
func (n *NodeService) NodeStageVolume(_ context.Context, request *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
NodeStageVolume is called by the CO when a workload that wants to use the specified volume is placed (scheduled) on a node.
func (*NodeService) NodeUnpublishVolume ¶
func (n *NodeService) NodeUnpublishVolume(_ context.Context, request *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
NodeUnpublishVolume unmount the volume from the target path
func (*NodeService) NodeUnstageVolume ¶
func (n *NodeService) NodeUnstageVolume(_ context.Context, request *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
NodeUnstageVolume is called by the CO when a workload that was using the specified volume is being moved to a different node.