everpeace / kube-throttler

throttling your pods in kubernetes cluster.
Apache License 2.0
32 stars 6 forks source link

Fail fast liveness probe by stopping ThrottleController when kubernetes api watch stopped #23

Closed everpeace closed 3 years ago

everpeace commented 3 years ago

Currently, RestartSource retries kubernetes api watch internally. This make is hard to find the watch restarting with unrecoverable failure like below in large cluster.

akka.stream.scaladsl.Framing$FramingException: JSON element exceeded maximumObjectLength (x00000 bytes)!

This PR changes ThrottleController to commit suicide and make this kubernetes liveness probe find this pod is not alive appropriately.