Drop the configure init container from Toolbox

What does this MR do?

Third step of the plan in #6745: remove the configure init container from the Toolbox Deployment and its backup and database reindex CronJobs. It uses the same approach as !5560 (merged) and !5562 (merged), which are merged.

Goal

  • Drop the configure container that needed gitlab-base. The configure init container runs a shell script from the gitlab-base image. Without it, the Toolbox Pods no longer need the gitlab-base image.
  • No copy at Pod start. The init container copied the Secrets into an emptyDir once, at Pod start. The main containers now read the projected volume directly. Settings rendered at container start keep their values, so restart the Pods after you change the Secrets.

Before and after

flowchart LR
  subgraph before["Before"]
    direction LR
    S1["Secrets and<br/>ConfigMaps"] --> P1["projected volume<br/>init-&lt;x&gt;-secrets"]
    P1 -- "/init-config" --> C1["configure init container<br/>sh script from gitlab-base"]
    C1 -- "copies once<br/>at Pod start" --> E1["emptyDir<br/>&lt;x&gt;-secrets"]
    E1 -- "read-only" --> M1["main container"]
  end
  subgraph after["After"]
    direction LR
    S2["Secrets and<br/>ConfigMaps"] --> P2["projected volume<br/>&lt;x&gt;-secrets"]
    P2 -- "read-only" --> M2["main container"]
  end

The main container mounts toolbox-secrets at /etc/gitlab in both cases, so it reads the same files.

Changes

  • Database backup credentials: the registry and OpenBao credentials are projected into toolbox-secrets under registry-db/ and openbao-db/. Before, separate volumes were mounted over these directories, which the script pre-created. The paths in /etc/gitlab don't change.
  • .s3cfg: with the s3 backup backend, .s3cfg is projected at the root of toolbox-secrets, where the script moved it.
  • fsGroup warning: Toolbox is added to the PostgreSQL SSL fsGroup warning from !5562 (merged). A separate commit names the charts in the warning relative to the global chart, like gitlab.webservice, as GitLab Duo asked on !5562 (merged). That fix missed the merge of !5562 (merged).
  • Values and docs: the unused init.image value and doc rows are removed. Toolbox is added to the 10.6.0 upgrade notes.
  • Upgrade notes: the restart bullet now reads "Restart the Pods after you change the Secrets." Toolbox starts new processes, such as gitlab-rake or backup-utility, in a running container, and they read the updated secret files, while settings rendered at container start keep their values. The previous wording suggested that a changed Secret has no effect at all before a restart.
  • Specs: the Toolbox exceptions from !5562 (merged) are gone. Toolbox assertions use the projected item paths like the other Rails Pods, and the PostgreSQL SSL path spec from !5562 (merged) also checks toolbox-secrets.

The configure script only copied files

On master, the Toolbox script runs the shared copy loop, the PostgreSQL SSL, NATS, and Topology Service TLS snippets from !5562 (merged), two mkdir calls, and one mv for .s3cfg.

I replayed master's rendered script against the source volumes and compared the result with this branch's projected volume. The value sets covered defaults, PostgreSQL and Geo SSL, the s3 backup backend with the backup CronJob, and NATS, Topology Service, and Redis TLS. Every staged file is projected at the same path in the Deployment and the backup CronJob. The only differences:

  • The files are owned by root:<fsGroup> instead of the container user (git:git). The mode stays 0440, except for the PostgreSQL SSL files, which the script set to 0600. The mount now also has the projected ..data symlink layout.
  • The registry-db/ and openbao-db/ files come from toolbox-secrets instead of their own volumes, at the same paths.

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?
    • The same templates were deployed in kind as part of !5555 (closed), including a Toolbox backup to S3.
  • 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

🤖 Generated with Claude Code

Edited by Stefan Bordei

Merge request reports

Loading
Loading