k8s

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNodeNotFound = errors.New("node not found")

ErrNodeNotFound represents the error that node is not found.

View Source
var ErrVolumeNotFound = errors.New("VolumeID is not found")

ErrVolumeNotFound represents the specified volume is not found.

Functions

This section is empty.

Types

type LogicalVolumeService added in v0.4.0

type LogicalVolumeService struct {
	client.Client
	// contains filtered or unexported fields
}

LogicalVolumeService represents service for LogicalVolume.

func NewLogicalVolumeService

func NewLogicalVolumeService(mgr manager.Manager) (*LogicalVolumeService, error)

NewLogicalVolumeService returns LogicalVolumeService.

func (*LogicalVolumeService) CreateVolume added in v0.4.0

func (s *LogicalVolumeService) CreateVolume(ctx context.Context, node, dc, name string, requestGb int64) (string, error)

CreateVolume creates volume

func (*LogicalVolumeService) DeleteVolume added in v0.4.0

func (s *LogicalVolumeService) DeleteVolume(ctx context.Context, volumeID string) error

DeleteVolume deletes volume

func (*LogicalVolumeService) ExpandVolume added in v0.4.0

func (s *LogicalVolumeService) ExpandVolume(ctx context.Context, volumeID string, requestGb int64) error

ExpandVolume expands volume

func (*LogicalVolumeService) GetVolume added in v0.4.0

func (s *LogicalVolumeService) GetVolume(ctx context.Context, volumeID string) (*topolvmv1.LogicalVolume, error)

GetVolume returns LogicalVolume by volume ID.

func (*LogicalVolumeService) UpdateCurrentSize added in v0.4.0

func (s *LogicalVolumeService) UpdateCurrentSize(ctx context.Context, volumeID string, size *resource.Quantity) error

UpdateCurrentSize updates .Status.CurrentSize of LogicalVolume.

func (*LogicalVolumeService) UpdateSpecSize added in v0.4.0

func (s *LogicalVolumeService) UpdateSpecSize(ctx context.Context, volumeID string, size *resource.Quantity) error

UpdateSpecSize updates .Spec.Size of LogicalVolume.

type NodeService added in v0.4.0

type NodeService struct {
	client.Client
}

NodeService represents node service.

func NewNodeService added in v0.4.0

func NewNodeService(mgr manager.Manager) *NodeService

NewNodeService returns NodeService.

func (NodeService) GetCapacityByName added in v0.4.0

func (s NodeService) GetCapacityByName(ctx context.Context, name, deviceClass string) (int64, error)

GetCapacityByName returns VG capacity of specified node by name.

func (NodeService) GetCapacityByTopologyLabel added in v0.4.0

func (s NodeService) GetCapacityByTopologyLabel(ctx context.Context, topology, dc string) (int64, error)

GetCapacityByTopologyLabel returns VG capacity of specified node by TopoLVM's topology label.

func (NodeService) GetMaxCapacity added in v0.4.0

func (s NodeService) GetMaxCapacity(ctx context.Context, deviceClass string) (string, int64, error)

GetMaxCapacity returns max VG capacity among nodes.

func (NodeService) GetTotalCapacity added in v0.4.0

func (s NodeService) GetTotalCapacity(ctx context.Context, dc string) (int64, error)

GetTotalCapacity returns total VG capacity of all nodes.

Jump to

Keyboard shortcuts

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