volumehelper

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShouldPerformSnapshotWithBackup deprecated

func ShouldPerformSnapshotWithBackup(
	unstructured runtime.Unstructured,
	groupResource schema.GroupResource,
	backup velerov1api.Backup,
	crClient crclient.Client,
	logger logrus.FieldLogger,
) (bool, error)

ShouldPerformSnapshotWithBackup is used for third-party plugins. It supports to check whether the PVC or PodVolume should be backed up on demand. On the other hand, the volumeHelperImpl assume there is a VolumeHelper instance initialized before calling the ShouldPerformXXX functions.

Deprecated: Use ShouldPerformSnapshotWithVolumeHelper instead for better performance. ShouldPerformSnapshotWithVolumeHelper allows passing a pre-created VolumeHelper with an internal PVC-to-Pod cache, which avoids O(N*M) complexity when there are many PVCs and pods. See issue #9179 for details.

func ShouldPerformSnapshotWithVolumeHelper added in v1.18.0

func ShouldPerformSnapshotWithVolumeHelper(
	unstructured runtime.Unstructured,
	groupResource schema.GroupResource,
	backup velerov1api.Backup,
	crClient crclient.Client,
	logger logrus.FieldLogger,
	vh volumehelper.VolumeHelper,
) (bool, error)

ShouldPerformSnapshotWithVolumeHelper is like ShouldPerformSnapshotWithBackup but accepts an optional VolumeHelper. If vh is non-nil, it will be used directly, avoiding the overhead of creating a new VolumeHelper on each call. This is useful for BIA plugins that process multiple PVCs during a single backup and want to reuse the same VolumeHelper (with its internal cache) across calls.

Types

This section is empty.

Jump to

Keyboard shortcuts

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