From e85e0bafbdee74a164f3de5ac61936ba33de8505 Mon Sep 17 00:00:00 2001 From: Ted Yu Date: Fri, 16 Aug 2019 12:59:21 -0700 Subject: [PATCH] Drop GetPods from ActualStateOfWorld --- .../cache/actual_state_of_world.go | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/pkg/kubelet/volumemanager/cache/actual_state_of_world.go b/pkg/kubelet/volumemanager/cache/actual_state_of_world.go index d29770bdbfa..0cc57aed0c4 100644 --- a/pkg/kubelet/volumemanager/cache/actual_state_of_world.go +++ b/pkg/kubelet/volumemanager/cache/actual_state_of_world.go @@ -145,11 +145,6 @@ type ActualStateOfWorld interface { // no longer referenced and may be globally unmounted and detached. GetUnmountedVolumes() []AttachedVolume - // GetPods generates and returns a map of pods in which map is indexed - // with pod's unique name. This map can be used to determine which pod is currently - // in actual state of world. - GetPods() map[volumetypes.UniquePodName]bool - // MarkFSResizeRequired marks each volume that is successfully attached and // mounted for the specified pod as requiring file system resize (if the plugin for the // volume indicates it requires file system resize). @@ -749,21 +744,6 @@ func (asw *actualStateOfWorld) GetUnmountedVolumes() []AttachedVolume { return unmountedVolumes } -func (asw *actualStateOfWorld) GetPods() map[volumetypes.UniquePodName]bool { - asw.RLock() - defer asw.RUnlock() - - podList := make(map[volumetypes.UniquePodName]bool) - for _, volumeObj := range asw.attachedVolumes { - for podName := range volumeObj.mountedPods { - if !podList[podName] { - podList[podName] = true - } - } - } - return podList -} - func (asw *actualStateOfWorld) newAttachedVolume( attachedVolume *attachedVolume) AttachedVolume { return AttachedVolume{