• Clayton Coleman's avatar
    Allow panics and unhandled errors to be reported to external targets · 04b864a9
    Clayton Coleman authored
    It would be better if Kubernetes could be instrumented to report panics
    and handled but unreturned errors in controller loops to a remote
    service.  This commit introduces settable handlers for HandleCrash and a new
    HandleError that can be overriden to report errors to a remote service
    for analysis.  HandleError() in particular is for control loops that do
    not return an error, and so there is no ability to report those errors
    other than in log files.
    
    ReplicationController is provided as an example.
    04b864a9
util.go 6.33 KB