mirror of
https://github.com/coredns/coredns.git
synced 2025-10-29 01:04:15 -04:00
Fix autopath crash when pods verified not enabled (#1099)
This commit is contained in:
committed by
Miek Gieben
parent
284061eee7
commit
6f19dda0b4
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user