volumes

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2019 License: MIT Imports: 7 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 (c *EBSVolumeResizer) ConnectToProvider() error

ConnectToProvider connects to AWS.

func (*EBSVolumeResizer) DisconnectFromProvider

func (c *EBSVolumeResizer) DisconnectFromProvider() error

DisconnectFromProvider closes connection to the EC2 instance

func (*EBSVolumeResizer) GetProviderVolumeID

func (c *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 (c *EBSVolumeResizer) IsConnectedToProvider() bool

IsConnectedToProvider checks if AWS connection is established.

func (*EBSVolumeResizer) ResizeVolume

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

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

func (*EBSVolumeResizer) VolumeBelongsToProvider

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

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

type VolumeResizer

type VolumeResizer interface {
	ConnectToProvider() error
	IsConnectedToProvider() bool
	VolumeBelongsToProvider(pv *v1.PersistentVolume) bool
	GetProviderVolumeID(pv *v1.PersistentVolume) (string, error)
	ResizeVolume(providerVolumeID string, newSize int64) error
	DisconnectFromProvider() 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