Runner Deployment to OpenShift Requires Home Folder Adjustment In Configmap
The default installation of gitlab-runner assumes /.gitlab-runner as the home directory. On OpenShift, and arbitrary non-root user is chosen for the contain, so accessing /.gitlab-runner will fail and prevent the runner from starting. As a work-around, we changed the chart to make use of /home/gilab-runner/.gitlab-runner to allow the system generated user access to the config.toml file required for start up. Our update is detailed below:
In the configmap.yml file, register-the-runner section, we needed to set the home folder for the runner before it would spin up in the OpenShift environment:
register-the-runner: | #!/bin/bash MAX_REGISTER_ATTEMPTS=30
for i in $(seq 1 "${MAX_REGISTER_ATTEMPTS}"); do
echo "Registration attempt ${i} of ${MAX_REGISTER_ATTEMPTS}"
/entrypoint register -c /home/gitlab-runner/.gitlab-runner/config.toml \
Can this be accounted for and fixed in the chart?