controller

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func NewController

func NewController(svc service.Service, zone string, maxVolumesPerNode int, l *logrus.Entry, labels ...string) (*Controller, error)

func (*Controller) ControllerExpandVolume

ControllerExpandVolume is called from the resizer to increase the volume size.

func (*Controller) ControllerGetCapabilities

ControllerGetCapabilities returns the capacity of the storage pool.

func (*Controller) ControllerGetVolume

func (*Controller) ControllerPublishVolume

ControllerPublishVolume attaches storage to a node via UpCloud Storage service.

func (*Controller) ControllerUnpublishVolume

ControllerUnpublishVolume is a reverse operation of ControllerPublishVolume.

The Plugin SHOULD perform the work that is necessary for making the volume ready to be consumed by a different node. The Plugin MUST NOT assume that this RPC will be executed on the node where the volume was previously used.

This RPC is typically called by the CO when the workload using the volume is being moved to a different node, or all the workload using the volume on a node has finished.

If the volume corresponding to the volume_id or the node corresponding to node_id cannot be found by the Plugin and the volume can be safely regarded as ControllerUnpublished from the node, the plugin SHOULD return 0 OK.

func (*Controller) CreateSnapshot

CreateSnapshot will be called by the CO to create a new snapshot from a source volume on behalf of a user.

func (*Controller) CreateVolume

func (c *Controller) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (resp *csi.CreateVolumeResponse, err error)

CreateVolume provisions storage via UpCloud Storage service.

func (*Controller) DeleteSnapshot

DeleteSnapshot will be called by the CO to delete a snapshot.

func (*Controller) DeleteVolume

DeleteVolume deletes storage via UpCloud Storage service.

func (*Controller) GetCapacity

GetCapacity returns the capacity of the storage pool.

func (*Controller) ListSnapshots

ListSnapshots returns the information about all snapshots on the storage system within the given parameters regardless of how they were created. ListSnapshots should not list a snapshot that is being created but has not been cut successfully yet.

TODO OPTIONAL: implement starting token / pagination.

func (*Controller) ListVolumes

ListVolumes returns a list of all requested volumes. TODO OPTIONAL: implement starting token / pagination.

func (*Controller) ValidateVolumeCapabilities

ValidateVolumeCapabilities checks if the volume capabilities are valid.

Jump to

Keyboard shortcuts

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