// SetPods clears the internal cache and populates it with the supplied pods.
SetPods clears the internal cache and populates it with the supplied pods.
// SetPods clears the internal cache and populates it with the supplied pods .
func (rm *ResourceManager) SetPods(pods *v1.PodList) {
	rm.Lock()
	defer rm.Unlock()
	rm.pods = make(map[string]*v1.Pod, len(pods.Items))
	rm.configMapRef = make(map[string]int64, 0)
	rm.secretRef = make(map[string]int64, 0)
	rm.configMaps = make(map[string]*v1.ConfigMap, len(pods.Items))
	rm.secrets = make(map[string]*v1.Secret, len(pods.Items))
	for k, p := range pods.Items {
		rm.pods[rm.getStoreKey(p.Namespace, p.Name)] = &pods.Items[k]
		rm.incrementRefCounters(&p)
	}
}
func ( rm * ResourceManager ) SetPods ( pods * v1 . PodList ) { rm . Lock ( ) defer rm . Unlock ( ) rm . pods = make ( map [ string ] * v1 . Pod , len ( pods . Items ) ) rm . configMapRef = make ( map [ string ] int64 , 0 ) rm . secretRef = make ( map [ string ] int64 , 0 ) rm . configMaps = make ( map [ string ] * v1 . ConfigMap , len ( pods . Items ) ) rm . secrets = make ( map [ string ] * v1 . Secret , len ( pods . Items ) ) for k , p := range pods . Items { rm . pods [ rm . getStoreKey ( p . Namespace , p . Name ) ] = & pods . Items [ k ] rm . incrementRefCounters ( & p ) } }
SetPods clears the internal cache and populates it with the supplied pods.
SetPods clears the internal cache and populates it with the supplied pods .