Skip to content

Kubernetes runner is deleted when restarted

Summary

When using the Kubernetes runner, restarting the runner (either by deleting the pod or performing a Helm upgrade after changing some config) the runner is deleted.

Steps to reproduce

Register a new runner in the normal way. Restart the the runner.

  1. Register a new runner (Create new runner, copy token into Helm values, Helm install/upgrade)
  2. Runner comes online and starts accepting jobs
  3. Restart the runner (either by deleting the pod or performing a Helm upgrade after changing some config)
  4. Observe that the runner log says the token is not valid
  5. Check the GitLab runners config to see that the runner has been fully deleted from GitLab

What is the current bug behavior?

Runners disappearing from GitLab

What is the expected correct behavior?

Runner briefly goes offline during restart but stays registered. When runner comes back up token is still valid and runner starts accepting work.