mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Fix nil pointer dereference in kube-apiserver when etcd is not there
This commit is contained in:
parent
08402d798c
commit
060ebfcea0
@ -214,6 +214,7 @@ func (p *PodCache) GarbageCollectPodStatus() {
|
||||
pods, err := p.pods.ListPods(api.NewContext(), labels.Everything())
|
||||
if err != nil {
|
||||
glog.Errorf("Error getting pod list: %v", err)
|
||||
return
|
||||
}
|
||||
keys := map[objKey]bool{}
|
||||
for _, pod := range pods.Items {
|
||||
|
Loading…
Reference in New Issue
Block a user