linodebs

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
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"
)

Variables

This section is empty.

Functions

Types

type LinodeControllerServer

type LinodeControllerServer struct {
	Driver          *LinodeDriver
	CloudProvider   linodeclient.LinodeClient
	MetadataService metadataservice.MetadataService
}

func NewControllerServer

func NewControllerServer(linodeDriver *LinodeDriver, cloudProvider linodeclient.LinodeClient, meta metadata.MetadataService) *LinodeControllerServer

func (*LinodeControllerServer) ControllerExpandVolume added in v0.1.7

func (*LinodeControllerServer) ControllerGetCapabilities

ControllerGetCapabilities returns the supported capabilities of controller service provided by this Plugin

func (*LinodeControllerServer) ControllerGetVolume added in v0.2.0

ControllerGetVolume allows probing for health status

func (*LinodeControllerServer) ControllerPublishVolume

ControllerPublishVolume attaches the given volume to the node

func (*LinodeControllerServer) ControllerUnpublishVolume

ControllerUnpublishVolume deattaches the given volume from the node

func (*LinodeControllerServer) CreateSnapshot

func (*LinodeControllerServer) CreateVolume

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 (*LinodeControllerServer) DeleteVolume

DeleteVolume deletes the given volume. The function is idempotent.

func (*LinodeControllerServer) GetCapacity

func (*LinodeControllerServer) ListSnapshots

func (*LinodeControllerServer) ListVolumes

ListVolumes shall return information about all the volumes the provider knows about

func (*LinodeControllerServer) ValidateVolumeCapabilities

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) AddControllerServiceCapabilities

func (linodeDriver *LinodeDriver) AddControllerServiceCapabilities(cl []csi.ControllerServiceCapability_RPC_Type) error

func (*LinodeDriver) AddNodeServiceCapabilities

func (linodeDriver *LinodeDriver) AddNodeServiceCapabilities(nl []csi.NodeServiceCapability_RPC_Type) error

func (*LinodeDriver) AddVolumeCapabilityAccessModes

func (linodeDriver *LinodeDriver) AddVolumeCapabilityAccessModes(vc []csi.VolumeCapability_AccessMode_Mode) error

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.MetadataService, 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
	MetadataService metadata.MetadataService
	// contains filtered or unexported fields
}

func NewNodeServer

func NewNodeServer(linodeDriver *LinodeDriver, mounter *mount.SafeFormatAndMount, deviceUtils mountmanager.DeviceUtils, cloudProvider linodeclient.LinodeClient, meta metadata.MetadataService) *LinodeNodeServer

func (*LinodeNodeServer) NodeExpandVolume added in v0.1.7

func (*LinodeNodeServer) NodeGetCapabilities

func (*LinodeNodeServer) NodeGetInfo

func (*LinodeNodeServer) NodeGetVolumeStats

func (*LinodeNodeServer) NodePublishVolume

func (*LinodeNodeServer) NodeStageVolume

func (*LinodeNodeServer) NodeUnpublishVolume

func (*LinodeNodeServer) NodeUnstageVolume

type LuksContext added in v0.6.0

type LuksContext struct {
	EncryptionEnabled bool
	EncryptionKey     string
	EncryptionCipher  string
	EncryptionKeySize string
	VolumeName        string
	VolumeLifecycle   VolumeLifecycle
}

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 added in v0.6.0

type VolumeLifecycle string

Jump to

Keyboard shortcuts

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