helm: consider handling readiness / liveness with HTTP probe instead

Just noticed that Helm deployment template using the following commands for probes:

  • Liveness: command: ["/bin/bash", "/configmaps/check-live", "{{ default 4 .Values.probeTimeoutSeconds | add -1 | max 1 }}"]
  • Readiness: command: ["/usr/bin/pgrep","gitlab.*runner"]

FWIW, you should provide HTTP probes here instead for more reliable healthz handling. Imagine process is running somehow but app doesn't expose any endpoint / port. So /healthz endpoint should return 200 OK. And also the following above commands requires having bash and pgrep binaries in the image.

You could just provide: /livez and /readyz endpoints in the gitlab-runner.

Related doc: https://gitlab.com/gitlab-org/gitlab-runner/-/blob/main/docs/install/kubernetes-agent.md?plain=1#L214

See Kubernetes doc: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/