Howdy, ya’ll.
I’ve been struggling with an issue for the past week and a half where I’m unable to install a GitLab runner chart for a newly created repository (we have dedicated runners on a self-managed GitLab instance for all our repositories in our CI/CD Kubernetes cluster).
The reason for the failed apply
execution is because of a sed
command that is triggered using a postrender
block from our custom runner module:
# The chart contains a default image tag of an alpine image. However, we use
# OCP images which don't have an alpine variant. Remove the alpine part from the tag.
postrender {
binary_path = "/bin/sed"
args = [
"-e",
"s/gitlab-runner-ocp:alpine-/gitlab-runner-ocp:/g"
]
}
The comment above mentions that we use OCP images for our runners. Here’s a snippet from the values.yaml file that we use:
## GitLab Runner Image
## By default it's using [registry.gitlab.com/gitlab-org/gitlab-runner:alpine-v{VERSION}](http://registry.gitlab.com/gitlab-org/gitlab-runner:alpine-v%7BVERSION%7D)
## where {VERSION} is taken from Chart.yaml from appVersion field
##
## ref: https://gitlab.com/gitlab-org/gitlab-runner/container_registry/29383?orderBy=NAME&sort=asc&search[]=alpine-v&search[]=
##
## Note: If you change the image to the ubuntu release
## don't forget to change the securityContext;
## these images run on different user IDs.
##
image:
registry: [registry.gitlab.com](http://registry.gitlab.com/)
image: gitlab-org/ci-cd/gitlab-runner-ubi-images/gitlab-runner-ocp
The actual output of the error message from our pipeline job:
Error: error while running post render on files: error while running command /bin/sed. error output:
│ BusyBox v1.36.1 (2023-11-07 18:53:09 UTC) multi-call binary.
│
│ Usage: sed [-i[SFX]] [-nrE] [-f FILE]... [-e CMD]... [FILE]...
│ or: sed [-i[SFX]] [-nrE] CMD [FILE]...
│
│ -e CMD Add CMD to sed commands to be executed
│ -f FILE Add FILE contents to sed commands to be executed
│ -i[SFX] Edit files in-place (otherwise write to stdout)
│ Optionally back files up, appending SFX
│ -n Suppress automatic printing of pattern space
│ -r,-E Use extended regex syntax
│
│ If no -e or -f, the first non-option argument is the sed command string.
│ Remaining arguments are input files (stdin if none).
│ : exit status 1
│
│ with module.runnerv2-protected["repo_name"].helm_release.runner,
│ on ../modules/runnerv2/main.tf line 124, in resource "helm_release" "runner":
│ 124: resource "helm_release" "runner" {
Does anyone happen know what is going on here? How would I go about debugging this particular issue?