Clear pod cache on delete.

This commit is contained in:
Brendan Burns
2015-01-26 16:11:16 -08:00
parent c65f83f424
commit f124842505
4 changed files with 79 additions and 0 deletions

View File

@@ -79,6 +79,13 @@ func (p *PodCache) GetPodStatus(namespace, name string) (*api.PodStatus, error)
return &value, nil
}
func (p *PodCache) ClearPodStatus(namespace, name string) {
p.lock.Lock()
defer p.lock.Unlock()
delete(p.podStatus, objKey{namespace, name})
}
func (p *PodCache) getNodeStatusInCache(name string) (*api.NodeStatus, bool) {
p.lock.Lock()
defer p.lock.Unlock()