Fix autopath crash when pods verified not enabled (#1099)
This commit is contained in:
parent
284061eee7
commit
6f19dda0b4
1 changed files with 3 additions and 0 deletions
|
@ -368,6 +368,9 @@ func (dns *dnsControl) ServiceList() []*api.Service {
|
|||
}
|
||||
|
||||
func (dns *dnsControl) PodIndex(ip string) []interface{} {
|
||||
if dns.podLister.Indexer == nil {
|
||||
return nil
|
||||
}
|
||||
pods, err := dns.podLister.Indexer.ByIndex(podIPIndex, ip)
|
||||
if err != nil {
|
||||
return nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue