hotplugdisk

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// visible for testing
	TargetPodBasePath = func(podBaseDir string, podUID types.UID) string {
		return filepath.Join(podBaseDir, string(podUID), hotplugDisksKubeletVolumePath)
	}
)

Functions

func GetVolumeMountDir added in v0.54.0

func GetVolumeMountDir(volumeName string) string

func NewHotplugDiskManager added in v0.42.0

func NewHotplugDiskManager(kubeletPodsDir string) *hotplugDiskManager

func NewHotplugDiskWithOptions added in v0.42.0

func NewHotplugDiskWithOptions(podsBaseDir string) *hotplugDiskManager

func SetLocalDirectory

func SetLocalDirectory(dir string) error

SetLocalDirectory creates the base directory where disk images will be mounted when hotplugged. File system volumes will be in a directory under this, that contains the volume name. block volumes will be in this directory as a block device.

Types

type HotplugDiskManagerInterface added in v0.42.0

type HotplugDiskManagerInterface interface {
	GetHotplugTargetPodPathOnHost(virtlauncherPodUID types.UID) (*safepath.Path, error)
	GetFileSystemDiskTargetPathFromHostView(virtlauncherPodUID types.UID, volumeName string, create bool) (*safepath.Path, error)
	GetFileSystemDirectoryTargetPathFromHostView(virtlauncherPodUID types.UID, volumeName string, create bool) (*safepath.Path, error)
}

Jump to

Keyboard shortcuts

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