// UpdatePod updates the supplied pod in the cache.
UpdatePod updates the supplied pod in the cache.
// UpdatePod updates the supplied pod in the cache .
func (rm *ResourceManager) UpdatePod(p *v1.Pod) bool {
	rm.Lock()
	defer rm.Unlock()
	podKey := rm.getStoreKey(p.Namespace, p.Name)
	if p.DeletionTimestamp != nil {
		if old, ok := rm.pods[podKey]; ok {
			rm.deletingPods[podKey] = p
			rm.decrementRefCounters(old)
			delete(rm.pods, podKey)
			return true
		}
		if _, ok := rm.deletingPods[podKey]; ok {
			return false
		}
		return false
	}
	if old, ok := rm.pods[podKey]; ok {
		rm.decrementRefCounters(old)
		rm.pods[podKey] = p
		rm.incrementRefCounters(p)
		return false
	}
	rm.pods[podKey] = p
	rm.incrementRefCounters(p)
	return true
}
func ( rm * ResourceManager ) UpdatePod ( p * v1 . Pod ) bool { rm . Lock ( ) defer rm . Unlock ( ) podKey := rm . getStoreKey ( p . Namespace , p . Name ) if p . DeletionTimestamp != nil { if old , ok := rm . pods [ podKey ] ; ok { rm . deletingPods [ podKey ] = p rm . decrementRefCounters ( old ) delete ( rm . pods , podKey ) return true } if _ , ok := rm . deletingPods [ podKey ] ; ok { return false } return false } if old , ok := rm . pods [ podKey ] ; ok { rm . decrementRefCounters ( old ) rm . pods [ podKey ] = p rm . incrementRefCounters ( p ) return false } rm . pods [ podKey ] = p rm . incrementRefCounters ( p ) return true }
UpdatePod updates the supplied pod in the cache.
UpdatePod updates the supplied pod in the cache .
// NOTE(junjiez): no reconcile as we don't support update pod.