Kubernetes runner does not detect InvalidImageName failure mode

Summary

Steps to reproduce

Using a kubernetes runner, try to run the following:

.gitlab-ci.yml
test-job:
  image: "docker pull debian:stretch"
  script:
  - echo "works"

Actual behavior

The job times out after the scheduled runner pod failing to get ready.

Expected behavior

The job fails after only a few minutes due to detecting the InvalidImageName fatal waiting state

Relevant logs and/or screenshots

https://gitlab.com/gitlab-org/gitlab-runner/-/blob/master/executors/kubernetes/util.go#L151

Environment description

Any kubernetes-runner on a cluster without pod image name validation

Used GitLab Runner version

All of 'em

Possible fixes

!2197 (merged)

Edited by Georgi N. Georgiev | GitLab