Drop the configure init container from Gitaly and Praefect
What does this MR do?
Step 4 of the plan in #6745: remove the configure init container from the Gitaly and Praefect StatefulSets, as !5560 (merged), !5562 (merged), and !5563 (merged) did for the other charts. The main containers mount the projected Secret volumes directly, under the former emptyDir names, so they read the same files at /etc/gitlab-secrets.
Changes
-
Gitaly and Praefect: the projected item paths include the subdirectory the script copied into, for example
gitaly/gitaly_tokenandpraefect/db_password. The unusedinit.imagevalues and doc rows are removed. -
Gitaly cgroups:
init-cgroupswrote the Pod cgroup path file into thegitaly-secretsemptyDir, which is now read-only. It writes the file into its own memoryemptyDirinstead:Before After Path file /etc/gitlab-secrets/gitaly-pod-cgroup/etc/gitaly-cgroup/gitaly-pod-cgroupVolume gitaly-secretsgitaly-cgroup-path, only withcgroups.enabledThe default
cgroups.mountpointreads the new path. A user-setmountpointthat reads the old path is rewritten to the new one. -
Upgrade notes: Gitaly and Praefect are added to the 10.6.0 notes, with the
mountpointchange.
Only undocumented customizations break: another container that reads /etc/gitlab-secrets/gitaly-pod-cgroup, or an OUTPUT_PATH override through extraEnv (Helm 3 only).
Verification
- Render comparison: master's rendered scripts, replayed against the source volumes, stage the same files at the same paths as this branch's projected volumes. The value sets covered defaults, Praefect with TLS and GPG signing, and Praefect with cgroups. The files are now
root:<fsGroup>instead ofgit:git. The mode stays0440. - Specs: every
/etc/gitlab-secrets/...path in the Gitaly and Praefectconfig.tomlis projected into the mounted volume, the cgroup path file reaches Gitaly, and a legacymountpointis rewritten. - kind upgrade from master (Praefect with two Gitaly replicas): Gitaly and Praefect roll without
configure,praefect sql-pinganddial-nodespass, the existing repository reads back, and a new one is created. With cgroups, Gitaly resolvesmountpointfrom the new path. kind on Podman can't movegitinto the repository cgroups, on master as well as on this branch.
Related issues
Related to #6745
Author checklist
For general guidance, please follow our Contributing guide.
Required
For anything in this list which will not be completed, please provide a reason in the MR discussion.
- Merge Request Title and Description are up to date, accurate, and descriptive.
- MR targeting the appropriate branch.
- MR has a green pipeline.
- Documentation created/updated.
- Tests added/updated.
- Have you validated that your change works end-to-end on a real cluster deployment?
- See Verification.
- Equivalent MR/issue for omnibus-gitlab opened. Not applicable.
- When ready for review, MR is marked as ready (not a draft) and assigned to a reviewer.
Reviewers checklist
- As soon as you begin reviewing, select Start a review on your first comment so the MR shows Reviewer started review.
- MR has a green pipeline on https://gitlab.com/gitlab-org/charts/gitlab.
- Consider downstream impact to the Operator, as per evaluating impact from changes to GitLab chart.