cinder

package
v1.25.4 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package cinder contains the internal representation of cinder volumes.

Index

Constants

View Source
const (
	// DefaultCloudConfigPath is the default path for cloud configuration
	DefaultCloudConfigPath = "/etc/kubernetes/cloud-config"
)

Variables

This section is empty.

Functions

func ProbeVolumePlugins

func ProbeVolumePlugins() []volume.VolumePlugin

ProbeVolumePlugins is the primary entrypoint for volume plugins.

Types

type BlockStorageProvider added in v1.10.0

type BlockStorageProvider interface {
	AttachDisk(instanceID, volumeID string) (string, error)
	DetachDisk(instanceID, volumeID string) error
	DeleteVolume(volumeID string) error
	CreateVolume(name string, size int, vtype, availability string, tags *map[string]string) (string, string, string, bool, error)
	GetDevicePath(volumeID string) string
	InstanceID() (string, error)
	GetAttachmentDiskPath(instanceID, volumeID string) (string, error)
	OperationPending(diskName string) (bool, string, error)
	DiskIsAttached(instanceID, volumeID string) (bool, error)
	DiskIsAttachedByName(nodeName types.NodeName, volumeID string) (bool, string, error)
	DisksAreAttachedByName(nodeName types.NodeName, volumeIDs []string) (map[string]bool, error)
	ShouldTrustDevicePath() bool
	Instances() (cloudprovider.Instances, bool)
	ExpandVolume(volumeID string, oldSize resource.Quantity, newSize resource.Quantity) (resource.Quantity, error)
}

BlockStorageProvider is the interface for accessing cinder functionality.

type DiskUtil added in v1.10.0

type DiskUtil struct{}

DiskUtil has utility/helper methods

func (*DiskUtil) AttachDisk added in v1.10.0

func (util *DiskUtil) AttachDisk(b *cinderVolumeMounter, globalPDPath string) error

AttachDisk attaches a disk specified by a volume.CinderPersistenDisk to the current kubelet. Mounts the disk to its global path.

func (*DiskUtil) CreateVolume added in v1.10.0

func (util *DiskUtil) CreateVolume(c *cinderVolumeProvisioner, node *v1.Node, allowedTopologies []v1.TopologySelectorTerm) (volumeID string, volumeSizeGB int, volumeLabels map[string]string, fstype string, err error)

CreateVolume uses the cloud provider entrypoint for creating a volume

func (*DiskUtil) DeleteVolume added in v1.10.0

func (util *DiskUtil) DeleteVolume(cd *cinderVolumeDeleter) error

DeleteVolume uses the cloud entrypoint to delete specified volume

func (*DiskUtil) DetachDisk added in v1.10.0

func (util *DiskUtil) DetachDisk(cd *cinderVolumeUnmounter) error

DetachDisk unmounts the device and detaches the disk from the kubelet's host machine.

Jump to

Keyboard shortcuts

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