Kubernetes runner image pull_policy Always not working
Summary
I have the pull_policy set to Always in the kubernetes runner settings:
[[runners]]
[runners.feature_flags]
FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY = false
[runners.cache]
Type = "gcs"
Path = "gitlabRunner"
Shared = true
[runners.cache.gcs]
BucketName = "XXX"
[runners.kubernetes]
image = "ubuntu:20.04"
namespace = "default"
privileged = true
cpu_request = "250m"
memory_request = "1Gi"
memory_limit = "3Gi"
image_pull_secret = "XXX"
pull_policy = "always"
However, when using a .gitlab-ci.yml file with a service linked:
test:
stage: test
retry: 2
artifacts:
expire_in: 1 week
paths:
- storage/logs
before_script:
- until nc -z $DB_HOST $DB_PORT; do sleep 1; echo "Waiting for DB to come up..."; done
script:
- phpdbg -qrr vendor/bin/phpunit --coverage-text --colors=never
dependencies:
- composer:install
services:
- registry.gitlab.com/XXX/backend-services/image-name:latest
The image does not get pulled, however if I do a rolling replace of the nodes in GCP, the latest image is then in place.
Used GitLab Runner version
Running with gitlab-runner 14.0.0 (3b6f852e)
on XXX-runner3-gitlab-runner-5cf67fc55d-wqcvw MHw6nVps
Resolving secrets
00:00
Preparing the "kubernetes" executor
00:00
Using Kubernetes namespace: default
Using Kubernetes executor with image XXX/php:ci-7.4 ...
Using attach strategy to execute scripts...
Preparing environment
Waiting for pod default/runner-mhw6nvps-project-20863920-concurrent-0qqgbl to be running, status is Pending
Waiting for pod default/runner-mhw6nvps-project-20863920-concurrent-0qqgbl to be running, status is Pending
ContainersNotInitialized: "containers with incomplete status: [init-logs]"
ContainersNotReady: "containers with unready status: [build helper svc-0]"
ContainersNotReady: "containers with unready status: [build helper svc-0]"
Waiting for pod default/runner-mhw6nvps-project-20863920-concurrent-0qqgbl to be running, status is Pending
ContainersNotInitialized: "containers with incomplete status: [init-logs]"
ContainersNotReady: "containers with unready status: [build helper svc-0]"
ContainersNotReady: "containers with unready status: [build helper svc-0]"
Running on runner-mhw6nvps-project-20863920-concurrent-0qqgbl via XXX-runner3-gitlab-runner-5cf67fc55d-wqcvw...