Skip to content

Adjust the runner image to match the configured podSecurityContext

What does this MR do?

The ubuntu image configured in the sample values.yaml file doesn't match the podSecurityContext. The runner couldn't be started. Error message in the log:

Registration attempt 1 of 30
Runtime platform                                    arch=amd64 os=linux pid=16 revision=8ec04662 version=16.3.0
WARNING: Running in user-mode.                     
WARNING: The user-mode requires you to manually start builds processing: 
WARNING: $ gitlab-runner run                       
WARNING: Use sudo for system-mode:                 
WARNING: $ sudo gitlab-runner...                   
                                                   
Created missing unique system ID                    system_id=r_F6CAjDDheEk0
WARNING: Couldn't save new system ID on state file. In order to reliably identify this runner in jobs with a known identifier,
please ensure there is a text file at the location specified in `state_file` with the contents of `system_id`. Example: echo "r_F6CAjDDheEk0" > "/.gitlab-runner/.runner_system_id"
  state_file=/.gitlab-runner/.runner_system_id system_id=r_F6CAjDDheEk0
Merging configuration from template file "/configmaps/config.template.toml" 
WARNING: Support for registration tokens and runner parameters in the 'register' command has been deprecated in GitLab Runner 15.6 and will be replaced with support for authentication tokens. For more information, see https://gitlab.com/gitlab-org/gitlab/-/issues/380872 
Registering runner... succeeded                     runner=GR13489412yemY5xN
PANIC: creating directory: mkdir /.gitlab-runner: permission denied 
Unregistering runner from GitLab succeeded          runner=Poq9ZS-i
Registration attempt 2 of 30
Runtime platform                                    arch=amd64 os=linux pid=35 revision=8ec04662 version=16.3.0
WARNING: Running in user-mode.                     
WARNING: The user-mode requires you to manually start builds processing: 
WARNING: $ gitlab-runner run                       
WARNING: Use sudo for system-mode:                 
WARNING: $ sudo gitlab-runner...                   
:                                                   

After dropping the ubuntu image the runner started as expected.

Merge request reports