watcher: Add temporary panic-on-error handling

This commit is contained in:
Rob Watson 2022-06-20 20:35:20 +02:00
parent 07552d10dd
commit c6b96ecad8
1 changed files with 4 additions and 0 deletions

View File

@ -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: