Fix autopath crash when pods verified not enabled (#1099)

This commit is contained in:
John Belamaric 2017-09-21 13:06:35 -04:00 committed by Miek Gieben
parent 284061eee7
commit 6f19dda0b4

View file

@ -368,6 +368,9 @@ func (dns *dnsControl) ServiceList() []*api.Service {
} }
func (dns *dnsControl) PodIndex(ip string) []interface{} { func (dns *dnsControl) PodIndex(ip string) []interface{} {
if dns.podLister.Indexer == nil {
return nil
}
pods, err := dns.podLister.Indexer.ByIndex(podIPIndex, ip) pods, err := dns.podLister.Indexer.ByIndex(podIPIndex, ip)
if err != nil { if err != nil {
return nil return nil