watcher: Add temporary panic-on-error handling
This commit is contained in:
parent
07552d10dd
commit
c6b96ecad8
|
@ -134,6 +134,10 @@ func (w *Watcher) Watch(ctx context.Context) error {
|
|||
w.watchResource(ctx, resource.GetUID(), labels.SelectorFromSet(selectorAsMap))
|
||||
case watch.Deleted:
|
||||
w.unwatchResource()
|
||||
case watch.Error:
|
||||
err := evt.Object.(error)
|
||||
// TODO: remove panic and handle error
|
||||
panic(err)
|
||||
}
|
||||
// errChan is never closed.
|
||||
case err := <-w.errChan:
|
||||
|
|
Loading…
Reference in New Issue