Skip to content

Commit e85e0ba

Browse files
tedyuyutedz
authored andcommitted
Drop GetPods from ActualStateOfWorld
1 parent 9b54021 commit e85e0ba

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

pkg/kubelet/volumemanager/cache/actual_state_of_world.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,6 @@ type ActualStateOfWorld interface {
145145
// no longer referenced and may be globally unmounted and detached.
146146
GetUnmountedVolumes() []AttachedVolume
147147

148-
// GetPods generates and returns a map of pods in which map is indexed
149-
// with pod's unique name. This map can be used to determine which pod is currently
150-
// in actual state of world.
151-
GetPods() map[volumetypes.UniquePodName]bool
152-
153148
// MarkFSResizeRequired marks each volume that is successfully attached and
154149
// mounted for the specified pod as requiring file system resize (if the plugin for the
155150
// volume indicates it requires file system resize).
@@ -749,21 +744,6 @@ func (asw *actualStateOfWorld) GetUnmountedVolumes() []AttachedVolume {
749744
return unmountedVolumes
750745
}
751746

752-
func (asw *actualStateOfWorld) GetPods() map[volumetypes.UniquePodName]bool {
753-
asw.RLock()
754-
defer asw.RUnlock()
755-
756-
podList := make(map[volumetypes.UniquePodName]bool)
757-
for _, volumeObj := range asw.attachedVolumes {
758-
for podName := range volumeObj.mountedPods {
759-
if !podList[podName] {
760-
podList[podName] = true
761-
}
762-
}
763-
}
764-
return podList
765-
}
766-
767747
func (asw *actualStateOfWorld) newAttachedVolume(
768748
attachedVolume *attachedVolume) AttachedVolume {
769749
return AttachedVolume{

0 commit comments

Comments
 (0)