mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
pkg/kubelet: minor cleanup in pod_manager.go
This commit is contained in:
parent
864f9b4a8a
commit
28c1726232
@ -215,10 +215,8 @@ func (self *basicPodManager) GetPodByName(namespace, name string) (*api.Pod, boo
|
|||||||
func (self *basicPodManager) GetPodByFullName(podFullName string) (*api.Pod, bool) {
|
func (self *basicPodManager) GetPodByFullName(podFullName string) (*api.Pod, bool) {
|
||||||
self.lock.RLock()
|
self.lock.RLock()
|
||||||
defer self.lock.RUnlock()
|
defer self.lock.RUnlock()
|
||||||
if pod, ok := self.podByFullName[podFullName]; ok {
|
pod, ok := self.podByFullName[podFullName]
|
||||||
return pod, true
|
return pod, ok
|
||||||
}
|
|
||||||
return nil, false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the UID belongs to a mirror pod, maps it to the UID of its static pod.
|
// If the UID belongs to a mirror pod, maps it to the UID of its static pod.
|
||||||
|
Loading…
Reference in New Issue
Block a user