-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed as not planned
Labels
lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Description
Currently, when a new informer is created, it will wait for a cache sync before returning to the caller.
Unless the provided context is canceled, this call blocks forever if the informer fails to perform the ListWatch operation, such as being given an invalid Kubernetes API server address or if the authentication is lacking appropriate credentials to access the requested resource.
I would like the ability to pass a WatchErrorHandler in cache.Options to created informers so I can log the specific error back to the user to help them understand why things aren't working.
Until this is available, there are two workarounds I've identified:
- Pass a context which has a timeout, which prevents the call from blocking forever but you don't know what the underlying error is.
- Rely on the default implementation for WatchErrorHandler, but this doesn't work for systems that aren't using klog.
captainroy-hy
Metadata
Metadata
Assignees
Labels
lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.Denotes an issue or PR that has aged beyond stale and will be auto-closed.