Use a separate function for checking if device was reconstructed

This commit is contained in:
Hemant Kumar
2023-12-13 10:18:57 -05:00
parent 56dd5ab10f
commit e706b6ba14
3 changed files with 14 additions and 12 deletions

View File

@@ -39,11 +39,6 @@ import (
volumetypes "k8s.io/kubernetes/pkg/volume/util/types"
)
const (
// EmptyUniquePodName is a UniquePodName for empty string.
EmptyUniquePodName volumetypes.UniquePodName = volumetypes.UniquePodName("")
)
// OperationExecutor defines a set of operations for attaching, detaching,
// mounting, or unmounting a volume that are executed with a NewNestedPendingOperations which
// prevents more than one operation from being triggered on the same volume.
@@ -234,6 +229,10 @@ type ActualStateOfWorldMounterUpdater interface {
// IsVolumeReconstructed returns true if volume currently added to actual state of the world
// was found during reconstruction.
IsVolumeReconstructed(volumeName v1.UniqueVolumeName, podName volumetypes.UniquePodName) bool
// IsVolumeDeviceReconstructed returns true if volume device identified by volumeName has been
// found during reconstruction.
IsVolumeDeviceReconstructed(volumeName v1.UniqueVolumeName) bool
}
// ActualStateOfWorldAttacherUpdater defines a set of operations updating the