the custom-config.toml configmap content is not getting updated fully in config.toml file of gitlab-runner pod
Here I am using below custom-config.toml file to append the custom volume settings in gitlab-runner pod
the content of custom-config.toml file
[[runners]]
[runners.kubernetes]
[runners.kubernetes.volumes]
[[runners.kubernetes.volumes.host_path]]
name = "docker"
mount_path = "/var/run/docker.sock"
read_only = false
[[runners.kubernetes.volumes.host_path]]
name = "buildah"
mount_path = "/var/lib/containers/"
read_only = false
then I use below gitlab-runner crd file
apiVersion: apps.gitlab.com/v1beta2
kind: Runner
metadata:
name: gitlab-runner
spec:
gitlabUrl: https://gitlab.com/
buildImage: alpine
token: gitlab-runner-secret
config: custom-config-toml
tags: openshift, test-runner
I created secret, crd using the documentation https://docs.gitlab.com/runner/install/openshift.html
gitlab-runner pod started successfully and its in running state.
but during the execution CI/CD job I am getting below error
$ buildah bud --cache-from ${IMAGE}:${TAG} -t ${IMAGE}:${TAG} $DOCKERFILE
error opening "/var/lib/containers/storage/storage.lock": permission denied
When I checked the config.toml file of gitlab-runner pod found that read_only = false property is not getting updated in config.toml file
the content of config.toml file of gitlab-runner pod
listen_address = "[::]:9252"
concurrent = 10
check_interval = 30
log_level = "info"
[session_server]
session_timeout = 1800
[[runners]]
name = "gitlab-runner-runner-xxxx"
output_limit = 4096
request_concurrency = 1
url = "https://gitlab.com"
token = "xxxx"
executor = "kubernetes"
[runners.custom_build_dir]
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
[runners.cache.azure]
[runners.kubernetes]
host = ""
bearer_token_overwrite_allowed = false
image = "alpine"
namespace = "test"
namespace_overwrite_allowed = ""
privileged = false
helper_image = "registry.connect.redhat.com/gitlab/gitlab-runner-helper@sha256:3e6842e5a68b1eb561ce218eae09dc1a37b2eab2a36d7e96ceab327c667d41a9"
poll_timeout = 180
service_account_overwrite_allowed = ""
pod_annotations_overwrite_allowed = ""
[runners.kubernetes.affinity]
[runners.kubernetes.pod_security_context]
[runners.kubernetes.volumes]
[[runners.kubernetes.volumes.host_path]]
name = "docker"
mount_path = "/var/run/docker.sock"
[[runners.kubernetes.volumes.host_path]]
name = "buildah"
mount_path = "/var/lib/containers/"
[runners.kubernetes.dns_config]