Skip to content

Merge Gitaly and git-base images

Patrick Steinhardt requested to merge pks-merge-gitaly-and-git-base into master

What does this MR do?

Originally, the git-base image was used by multiple other images so that they could get a Git distribution. Nowadays though there are no parts with a dependency on Git anymore except for Gitaly. This was made explicit with 22f33766 (Merge branch 'pks-reduce-git-dependency' into 'master', 2022-03-29), which removed the git-base dependency from all images except from the gitaly image.

With this change in architecture there is no real reason to keep the git-base image separate anymore, so we can just as well merge it into the gitaly image. This has two main advantages:

- We can shrink the size of the `git-base` image because we can
  remove build-time dependencies again.

- Furthermore, we can easily convert Gitaly from the current Git
  distribution it installs to instead only install a bundled Git
  version. Bundled Git will only install a small subset of Git
  binaries which are really required by Gitaly at runtime.
  Furthermore, this allows Gitaly to install multiple Git versions
  at the same time and thus use feature flags to do rollouts of Git
  versions.

So let's merge functionality provided by the git-base image into the gitaly image so that we can drop the former one.

Related issues

gitlab-org/charts/gitlab#3029 (closed)

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion

Required

  • Merge Request Title, and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Integration tests added to GitLab QA
  • The impact any change in container size has should be evaluated
Edited by Jason Plum

Merge request reports