Allow overwrite of pod entrypoint command in deployments.yaml
Summary
I'd like to be able to overwrite the pod entrypoint command here:
templates/deployments.yaml
Why?
When using GitLab UBI images to run this on OpenShift /usr/bin/dumb-init
doesn't exist.
Suggested solution
Would have opened an MR, but I am not allowed to push code
diff --git a/templates/deployment.yaml b/templates/deployment.yaml
index 5e5af0b..65a2a27 100644
--- a/templates/deployment.yaml
+++ b/templates/deployment.yaml
@@ -62,7 +62,7 @@ spec:
allowPrivilegeEscalation: false
{{- include "gitlab-runner.unregisterRunner" . | nindent 8 }}
{{- include "gitlab-runner.unregisterRunners" . | nindent 8 }}
- command: ["/usr/bin/dumb-init", "--", "/bin/bash", "/configmaps/entrypoint"]
+ command: {{ .Values.containers.initCommand }}
env:
{{ include "gitlab-runner.runner-env-vars" . | indent 8 }}
livenessProbe:
diff --git a/values.yaml b/values.yaml
index 46f5ce9..5ce45f4 100644
--- a/values.yaml
+++ b/values.yaml
@@ -16,6 +16,17 @@ image:
image: gitlab-org/gitlab-runner
# tag: alpine-v11.6.0
+## Pod entrypoint
+##
+## Default command works for the registry.gitlab.com/gitlab-org/gitlab-runner:alpine-v{VERSION} images
+## where {VERSION} is taken from Chart.yaml from appVersion field.
+##
+## Note: When using GitLab Runner UBI images or other images where /usr/bin/dumb-init doesn't exists
+## replace this with ["/bin/bash", "/configmaps/entrypoint"]
+##
+containers:
+ command: ["/usr/bin/dumb-init", "--", "/bin/bash", "/configmaps/entrypoint"]
+
## Specify a imagePullPolicy for the main runner deployment
## 'Always' if imageTag is 'latest', else set to 'IfNotPresent'
##
Edited by Fredrik Lindgren