glog.Warningf("Unable to retrieve pull secret %s/%s for %s/%s due to %v. The image pull may not succeed.",pod.Namespace,secretRef.Name,pod.Namespace,pod.Name,err)
continue
}
pullSecrets=append(pullSecrets,*secret)
}
returnpullSecrets,nil
}
// Get pods which should be resynchronized. Currently, the following pod should be resynchronized:
glog.Warningf("Unable to retrieve pull secret %s/%s for %s/%s due to %v. The image pull may not succeed.",pod.Namespace,secretRef.Name,pod.Namespace,pod.Name,err)
continue
}
pullSecrets=append(pullSecrets,*secret)
}
returnpullSecrets,nil
}
// Returns true if pod is in the terminated state ("Failed" or "Succeeded").
func(kl*Kubelet)podIsTerminated(pod*api.Pod)bool{
varstatusapi.PodStatus
// Check the cached pod status which was set after the last sync.
status,ok:=kl.statusManager.GetPodStatus(pod.UID)
if!ok{
// If there is no cached status, use the status from the
// apiserver. This is useful if kubelet has recently been