preStop k8s lifecycle hook (gitlab ci job definitions)
Problem
The lack of lifecycle hooks for the GitLab Runner Kubernetes executor is a major annoyance for teams that are executing their CI jobs on Runners hosted on Kuberenetes. Today you can configure life-cycle hooks in the runner config.toml
, however that is encompasssing for all containers for that runner. If a user needs to configure a specific type of hook for a specific job in a pipeline, that option is not available today.
Proposal
- Specify lifecycle hooks on a per-job basis.
- Add the lifecycle hooks properties to the
.gitlab-ci.yaml
file.
Edited by Darren Eastman