Documentation ¶
Index ¶
- Constants
- func ControllerServiceCapabilities() []*csi.ControllerServiceCapability
- func NodeServiceCapabilities() []*csi.NodeServiceCapability
- func VolumeCapabilityAccessModes() []*csi.VolumeCapability_AccessMode
- type LinodeControllerServer
- func (linodeCS *LinodeControllerServer) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
- func (linodeCS *LinodeControllerServer) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
- func (linodeCS *LinodeControllerServer) ControllerGetVolume(ctx context.Context, req *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
- func (linodeCS *LinodeControllerServer) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
- func (linodeCS *LinodeControllerServer) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
- func (linodeCS *LinodeControllerServer) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
- func (linodeCS *LinodeControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
- func (linodeCS *LinodeControllerServer) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
- func (linodeCS *LinodeControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
- func (linodeCS *LinodeControllerServer) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
- func (linodeCS *LinodeControllerServer) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
- func (linodeCS *LinodeControllerServer) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
- func (linodeCS *LinodeControllerServer) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
- type LinodeDriver
- func (linodeDriver *LinodeDriver) Run(endpoint string)
- func (linodeDriver *LinodeDriver) SetupLinodeDriver(linodeClient linodeclient.LinodeClient, mounter *mount.SafeFormatAndMount, ...) error
- func (linodeDriver *LinodeDriver) ValidateControllerServiceRequest(c csi.ControllerServiceCapability_RPC_Type) error
- type LinodeIdentityServer
- func (linodeIdentity *LinodeIdentityServer) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
- func (linodeIdentity *LinodeIdentityServer) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
- func (linodeIdentity *LinodeIdentityServer) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
- type LinodeNodeServer
- func (ns *LinodeNodeServer) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
- func (ns *LinodeNodeServer) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
- func (ns *LinodeNodeServer) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
- func (ns *LinodeNodeServer) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
- func (ns *LinodeNodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
- func (ns *LinodeNodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
- func (ns *LinodeNodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
- func (ns *LinodeNodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
- type LuksContext
- type Metadata
- type NonBlockingGRPCServer
- type VolumeLifecycle
Constants ¶
const ( // VolumeTags is a comma seperated string used to pass information to the linode APIs to tag the // created volumes VolumeTags = driverName + "/volumeTags" // PublishInfoVolumeName is used to pass the volume name from // `ControllerPublishVolume` to `NodeStageVolume or `NodePublishVolume` PublishInfoVolumeName = driverName + "/volume-name" VolumeLifecycleNodeStageVolume VolumeLifecycle = "NodeStageVolume" VolumeLifecycleNodePublishVolume VolumeLifecycle = "NodePublishVolume" VolumeLifecycleNodeUnstageVolume VolumeLifecycle = "NodeUnstageVolume" VolumeLifecycleNodeUnpublishVolume VolumeLifecycle = "NodeUnpublishVolume" // Linode Volume Topology Region Label VolumeTopologyRegion string = "topology.linode.com/region" )
const ( // LuksEncryptedAttribute is used to pass the information if the volume should be // encrypted with luks to `NodeStageVolume` LuksEncryptedAttribute = driverName + "/luks-encrypted" // LuksCipherAttribute is used to pass the information about the luks encryption // cipher to `NodeStageVolume` LuksCipherAttribute = driverName + "/luks-cipher" // LuksKeySizeAttribute is used to pass the information about the luks key size // to `NodeStageVolume` LuksKeySizeAttribute = driverName + "/luks-key-size" // LuksKeyAttribute is the key of the luks key used in the map of secrets passed from the CO LuksKeyAttribute = "luksKey" )
const LinodeIDPath = "/linode-info/linode-id"
LinodeIDPath is the path to a file containing only the ID of the Linode instance the CSI node plugin is currently running on. This file is expected to be placed into the Linode by the init container provided with the CSI node plugin.
Variables ¶
This section is empty.
Functions ¶
func ControllerServiceCapabilities ¶
func ControllerServiceCapabilities() []*csi.ControllerServiceCapability
ControllerServiceCapabilities returns the list of capabilities supported by this driver's controller service.
func NodeServiceCapabilities ¶
func NodeServiceCapabilities() []*csi.NodeServiceCapability
NodeServiceCapabilities returns the list of capabilities supported by this driver's node service.
func VolumeCapabilityAccessModes ¶
func VolumeCapabilityAccessModes() []*csi.VolumeCapability_AccessMode
VolumeCapabilityAccessModes returns the allowed access modes for a volume created by the driver.
Types ¶
type LinodeControllerServer ¶
type LinodeControllerServer struct { Driver *LinodeDriver CloudProvider linodeclient.LinodeClient Metadata Metadata }
func NewControllerServer ¶
func NewControllerServer(linodeDriver *LinodeDriver, cloudProvider linodeclient.LinodeClient, metadata Metadata) *LinodeControllerServer
func (*LinodeControllerServer) ControllerExpandVolume ¶
func (linodeCS *LinodeControllerServer) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error)
func (*LinodeControllerServer) ControllerGetCapabilities ¶
func (linodeCS *LinodeControllerServer) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error)
ControllerGetCapabilities returns the supported capabilities of controller service provided by this Plugin
func (*LinodeControllerServer) ControllerGetVolume ¶
func (linodeCS *LinodeControllerServer) ControllerGetVolume(ctx context.Context, req *csi.ControllerGetVolumeRequest) (*csi.ControllerGetVolumeResponse, error)
ControllerGetVolume allows probing for health status
func (*LinodeControllerServer) ControllerPublishVolume ¶
func (linodeCS *LinodeControllerServer) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error)
ControllerPublishVolume attaches the given volume to the node
func (*LinodeControllerServer) ControllerUnpublishVolume ¶
func (linodeCS *LinodeControllerServer) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error)
ControllerUnpublishVolume deattaches the given volume from the node
func (*LinodeControllerServer) CreateSnapshot ¶
func (linodeCS *LinodeControllerServer) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error)
func (*LinodeControllerServer) CreateVolume ¶
func (linodeCS *LinodeControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error)
CreateVolume will be called by the CO to provision a new volume on behalf of a user (to be consumed as either a block device or a mounted filesystem). This operation is idempotent.
func (*LinodeControllerServer) DeleteSnapshot ¶
func (linodeCS *LinodeControllerServer) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error)
func (*LinodeControllerServer) DeleteVolume ¶
func (linodeCS *LinodeControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error)
DeleteVolume deletes the given volume. The function is idempotent.
func (*LinodeControllerServer) GetCapacity ¶
func (linodeCS *LinodeControllerServer) GetCapacity(ctx context.Context, req *csi.GetCapacityRequest) (*csi.GetCapacityResponse, error)
func (*LinodeControllerServer) ListSnapshots ¶
func (linodeCS *LinodeControllerServer) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error)
func (*LinodeControllerServer) ListVolumes ¶
func (linodeCS *LinodeControllerServer) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) (*csi.ListVolumesResponse, error)
ListVolumes shall return information about all the volumes the provider knows about
func (*LinodeControllerServer) ValidateVolumeCapabilities ¶
func (linodeCS *LinodeControllerServer) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error)
ValidateVolumeCapabilities checks whether the volume capabilities requested are supported.
type LinodeDriver ¶
type LinodeDriver struct {
// contains filtered or unexported fields
}
func GetLinodeDriver ¶
func GetLinodeDriver() *LinodeDriver
func (*LinodeDriver) Run ¶
func (linodeDriver *LinodeDriver) Run(endpoint string)
func (*LinodeDriver) SetupLinodeDriver ¶
func (linodeDriver *LinodeDriver) SetupLinodeDriver( linodeClient linodeclient.LinodeClient, mounter *mount.SafeFormatAndMount, deviceUtils mountmanager.DeviceUtils, metadata Metadata, name, vendorVersion, bsPrefix string, ) error
func (*LinodeDriver) ValidateControllerServiceRequest ¶
func (linodeDriver *LinodeDriver) ValidateControllerServiceRequest(c csi.ControllerServiceCapability_RPC_Type) error
type LinodeIdentityServer ¶
type LinodeIdentityServer struct {
Driver *LinodeDriver
}
func NewIdentityServer ¶
func NewIdentityServer(linodeDriver *LinodeDriver) *LinodeIdentityServer
func (*LinodeIdentityServer) GetPluginCapabilities ¶
func (linodeIdentity *LinodeIdentityServer) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error)
func (*LinodeIdentityServer) GetPluginInfo ¶
func (linodeIdentity *LinodeIdentityServer) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error)
GetPluginInfo(context.Context, *GetPluginInfoRequest) (*GetPluginInfoResponse, error)
func (*LinodeIdentityServer) Probe ¶
func (linodeIdentity *LinodeIdentityServer) Probe(ctx context.Context, req *csi.ProbeRequest) (*csi.ProbeResponse, error)
type LinodeNodeServer ¶
type LinodeNodeServer struct { Driver *LinodeDriver Mounter *mount.SafeFormatAndMount DeviceUtils mountmanager.DeviceUtils CloudProvider linodeclient.LinodeClient Metadata Metadata // contains filtered or unexported fields }
func NewNodeServer ¶
func NewNodeServer(linodeDriver *LinodeDriver, mounter *mount.SafeFormatAndMount, deviceUtils mountmanager.DeviceUtils, cloudProvider linodeclient.LinodeClient, metadata Metadata) *LinodeNodeServer
func (*LinodeNodeServer) NodeExpandVolume ¶
func (ns *LinodeNodeServer) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandVolumeRequest) (*csi.NodeExpandVolumeResponse, error)
func (*LinodeNodeServer) NodeGetCapabilities ¶
func (ns *LinodeNodeServer) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error)
func (*LinodeNodeServer) NodeGetInfo ¶
func (ns *LinodeNodeServer) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error)
func (*LinodeNodeServer) NodeGetVolumeStats ¶
func (ns *LinodeNodeServer) NodeGetVolumeStats(ctx context.Context, req *csi.NodeGetVolumeStatsRequest) (*csi.NodeGetVolumeStatsResponse, error)
func (*LinodeNodeServer) NodePublishVolume ¶
func (ns *LinodeNodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error)
func (*LinodeNodeServer) NodeStageVolume ¶
func (ns *LinodeNodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error)
func (*LinodeNodeServer) NodeUnpublishVolume ¶
func (ns *LinodeNodeServer) NodeUnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error)
func (*LinodeNodeServer) NodeUnstageVolume ¶
func (ns *LinodeNodeServer) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error)
type LuksContext ¶
type Metadata ¶
type Metadata struct { ID int // Instance ID. Label string // The label assigned to the instance. Region string // Region the instance is running in. Memory uint // Amount of memory the instance has, in bytes. }
Metadata contains metadata about the node/instance the CSI node plugin is running on.
func GetMetadata ¶
GetMetadata retrieves information about the current node/instance from the Linode Metadata Service. If the Metadata Service is unavailable, or this function otherwise returns a non-nil error, callers should call GetMetadataFromAPI.
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() }
Defines Non blocking GRPC server interfaces
func NewNonBlockingGRPCServer ¶
func NewNonBlockingGRPCServer() NonBlockingGRPCServer
type VolumeLifecycle ¶
type VolumeLifecycle string