util

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: Apache-2.0 Imports: 33 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckExpand added in v1.7.0

func CheckTotalSnapshotSizeOnNamespace added in v1.4.0

func CheckTotalSnapshotSizeOnNamespace(
	pvcCache ctlcorev1.PersistentVolumeClaimCache,
	engineCache ctllonghornv1.EngineCache,
	scCache ctlstoragev1.StorageClassCache,
	namespaceName string,
	totalSnapshotSizeQuota int64,
) error

func CheckTotalSnapshotSizeOnVM added in v1.4.0

func CheckTotalSnapshotSizeOnVM(
	pvcCache ctlcorev1.PersistentVolumeClaimCache,
	engineCache ctllonghornv1.EngineCache,
	scCache ctlstoragev1.StorageClassCache,
	vm *kubevirtv1.VirtualMachine,
	totalSnapshotSizeQuota int64,
) error

func GetHTTPTransportWithCertificates added in v1.1.3

func GetHTTPTransportWithCertificates(config *rest.Config) (*http.Transport, error)

func GetLHEngine added in v1.4.0

func GetLHEngine(engineCache ctllonghornv1.EngineCache, volumeName string) (*longhornv1beta2.Engine, error)

func GetUsableIPAddresses added in v1.6.0

func GetUsableIPAddresses(includeRange string, excludeRange []string) (map[string]struct{}, error)

func GetUsableIPAddressesCount added in v1.5.0

func GetUsableIPAddressesCount(includeRange string, excludeRange []string) (int, error)

func HasInProgressingVMBackupBySourceUID

func HasInProgressingVMBackupBySourceUID(cache ctlharvesterv1.VirtualMachineBackupCache, sourceUID string) (bool, error)

func HasInProgressingVMRestoreOnSameTarget added in v1.0.3

func HasInProgressingVMRestoreOnSameTarget(cache ctlharvesterv1.VirtualMachineRestoreCache, targetNamespace, targetName string) (bool, error)

func IsLHBackupRelated added in v1.5.0

func IsLHBackupRelated(vmb *v1beta1.VirtualMachineBackup) error

While we try to recover a VMBackup remote, if the volumeBackup has no LonghornBackupName, it can be the volume backup is not completed or the volume backup is from third-party storage from the misleading items https://github.com/harvester/harvester/issues/7755#issue-2896409886. We should reject to recover such VMBackups

func StrictAtoi added in v1.6.0

func StrictAtoi(s string) (int, error)

func ValidateProvisionerAndConfig added in v1.5.0

func ValidateProvisionerAndConfig(pvc *corev1.PersistentVolumeClaim,
	engineCache ctllonghornv1.EngineCache, scCache ctlstoragev1.StorageClassCache, bt v1beta1.BackupType,
	cdc map[string]settings.CSIDriverInfo) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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