volumes

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EBSVolumeResizer

type EBSVolumeResizer struct {
	AWSRegion string
	// contains filtered or unexported fields
}

EBSVolumeResizer implements volume resizing interface for AWS EBS volumes.

func (*EBSVolumeResizer) ConnectToProvider

func (r *EBSVolumeResizer) ConnectToProvider() error

ConnectToProvider connects to AWS.

func (*EBSVolumeResizer) DescribeVolumes added in v1.6.0

func (r *EBSVolumeResizer) DescribeVolumes(volumeIds []string) ([]VolumeProperties, error)

DescribeVolumes ...

func (*EBSVolumeResizer) DisconnectFromProvider

func (r *EBSVolumeResizer) DisconnectFromProvider() error

DisconnectFromProvider closes connection to the EC2 instance

func (*EBSVolumeResizer) ExtractVolumeID added in v1.6.0

func (r *EBSVolumeResizer) ExtractVolumeID(volumeID string) (string, error)

ExtractVolumeID extracts volumeID from "aws://eu-central-1a/vol-075ddfc4a127d0bd4" or return only the vol-075ddfc4a127d0bd4 when it doesn't have "aws://"

func (*EBSVolumeResizer) GetProviderVolumeID

func (r *EBSVolumeResizer) GetProviderVolumeID(pv *v1.PersistentVolume) (string, error)

GetProviderVolumeID converts aws://eu-central-1b/vol-00f93d4827217c629 to vol-00f93d4827217c629 for EBS volumes

func (*EBSVolumeResizer) IsConnectedToProvider

func (r *EBSVolumeResizer) IsConnectedToProvider() bool

IsConnectedToProvider checks if AWS connection is established.

func (*EBSVolumeResizer) ModifyVolume added in v1.6.0

func (r *EBSVolumeResizer) ModifyVolume(volumeID string, newType *string, newSize *int64, iops *int64, throughput *int64) error

ModifyVolume Modify EBS volume

func (*EBSVolumeResizer) ResizeVolume

func (r *EBSVolumeResizer) ResizeVolume(volumeID string, newSize int64) error

ResizeVolume actually calls AWS API to resize the EBS volume if necessary.

func (*EBSVolumeResizer) VolumeBelongsToProvider

func (r *EBSVolumeResizer) VolumeBelongsToProvider(pv *v1.PersistentVolume) bool

VolumeBelongsToProvider checks if the given persistent volume is backed by EBS.

type VolumeProperties added in v1.6.0

type VolumeProperties struct {
	VolumeID   string
	VolumeType string
	Size       int64
	Iops       int64
	Throughput int64
}

VolumeProperties ...

type VolumeResizer

type VolumeResizer interface {
	ConnectToProvider() error
	IsConnectedToProvider() bool
	VolumeBelongsToProvider(pv *v1.PersistentVolume) bool
	GetProviderVolumeID(pv *v1.PersistentVolume) (string, error)
	ExtractVolumeID(volumeID string) (string, error)
	ResizeVolume(providerVolumeID string, newSize int64) error
	ModifyVolume(providerVolumeID string, newType *string, newSize *int64, iops *int64, throughput *int64) error
	DisconnectFromProvider() error
	DescribeVolumes(providerVolumesID []string) ([]VolumeProperties, error)
}

VolumeResizer defines the set of methods used to implememnt provider-specific resizing of persistent volumes.

Jump to

Keyboard shortcuts

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