Closed Ghazgkull closed 4 years ago
Please note that after some reflection and further reading, I pushed a new commit which handles the error in a better way. The approach here is to throw a typed exception (GoneError) which can be caught in set_up_pod_thread
in order to restart get_pods_and_start_watcher
. This means we'll go back out and get the latest resourceVersions, which should allow us to gracefully recover from the 410.
@Ghazgkull this LGTM. Do you have anything you can post ouside of the unit test to confirm this addresses the issue? Have you built and run it manually?
@jcantrill I'd love to do more validation, but I would need some guidance.
Prior to submitting this PR, my experience with fluentd is limited to deploying the fluentd-elasticsearch helm chart to my clusters. Trying to imagine how I'd be able to test this out in a deployment feels like it might be a major undertaking. I imagine I'd have to:
There is probably an easier way to test it but further reviewing the changes, I don't believe we are any worse off then before and the unit tests confirm behavior.
This PR addresses Issue #226 by adding handling for 410 Gone responses to the pod watch handling in this plugin.
I've included a unit test which verifies the expected behavior.