fix 'runtime.Object is nil'

This commit is contained in:
GLYASAI 2020-02-14 11:31:22 +08:00
parent ab08a1074f
commit 8058cee2c9

View File

@ -84,6 +84,9 @@ func (k *k8sDiscover) discover(name string, callback CallbackUpdate) {
case <-ctx.Done():
return
case event := <-w.ResultChan():
if event.Object == nil {
continue
}
pod := event.Object.(*corev1.Pod)
ep := endpointForPod(pod)
switch event.Type {