adds support for adding additional containers, volumes and volumemounts
What does this MR do?
It implements support for adding additional containers, volumes and volumeMounts to the gitlab-runner deployment manifest. These can be supplied via new Helm variables extraContainers
, extraVolumes
and extraVolumeMounts
.
extraContainers
and extraVolumes
are new additions to the pod, extraVolumeMounts
are added to the gitlab-runner existing container.
Why was this MR needed?
It enables users of this Helm chart to customize their gitlab-runner deployment according to their specific requirements (e.g. to add a Docker-In-Docker sidecar to provide access to a Docker daemon for gitlab-runners running on Kubernetes clusters with containerd).
What's the best way to test this MR?
- edit
values.yaml
and add values forextraContainers
,extraVolumes
andextraVolumeMounts
, e.g.:
extraContainers: |
- name: docker
image: docker:20.10-dind
securityContext:
privileged: true
volumeMounts:
- mountPath: /var/run/
name: dind-socket
lifecycle:
postStart:
exec:
command: [ "sh", "-c", "until docker info; do sleep 1; done;" ]
extraVolumes: |
- emptyDir: {}
name: dind-socket
extraVolumeMounts: |
- mountPath: /var/run/
name: dind-socket
-
execute
helm template . -f values.yaml
-
verify that the rendered deployment manifest contains the additional container, volume and volumeMount as configured above