charts
charts copied to clipboard
Graceful shutdown is not working without adding sleep in preStop
Graceful shutdown is not working because API call to endpoint - http://localhost:8080/v1/info/state returns 200 response instantly and kubernetes is killing that pod without waiting for terminationGracePeriodSeconds. While preStop command should wait for active tasks to be completed. Currently there can be 2 workarounds
- Add sleep time of
Values.worker.terminationGracePeriodSecondsin preStop hook - API call should return 200 response only when all active tasks are completed rather than scheduling them in ScheduleFuture.
Related PR for graceful shutdown - https://github.com/trinodb/charts/pull/226/files#diff-d18e49ecf4264ad889f2d0a897b2075c8c99b542f69e2b91106a8d1809c0b386R190-R202