add preStop lifecycle hook for graceful stop
This merge request does the following:
- add a graceful-stop script that sends a
SIGQUIT
and waits forgitlab-runner
to stop gracefully - moves the conditional runner unregistration to the graceful-stop script
- add a
terminationGracePeriodSeconds
value to control the same parameter of the gitlab-runner pod
This implements the solution proposed by @julienvey to solve gitlab-org/gitlab-runner#3235 (closed)
Edited by Tomasz Maczukin