Drop the configure init container from the Rails Pods

What does this MR do?

Second step of the plan in #6745: remove the configure init container from Webservice, Sidekiq, Migrations and Geo Log Cursor. It uses the same approach as !5560 (merged), which is merged.

Goal

  • Drop the configure container that needed gitlab-base. The configure init containers run a shell script from the gitlab-base image. Without them, these 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 volumes directly. The components still read the files only at startup, so Secret changes still need a Pod restart.

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 <x>-secrets at the same path in both cases, so it reads the same files.

Changes

  • PostgreSQL SSL: new gitlab.psql.ssl.secretSource and gitlab.geo.psql.ssl.secretSource helpers project the SSL files to postgres/ssl/, where the script copied them. The client key is root:<fsGroup> 0440, which libpq accepts.
  • fsGroup warning: the release notes warn when PostgreSQL SSL is configured and one of these charts has no securityContext.fsGroup. The requirement isn't new: without an fsGroup, the configure container already failed to read the root-owned key. Now the main container fails instead.
  • Workhorse: gets its own workhorse-secrets projected volume with its Redis secrets, replacing workhorse.redis.secret-setup.
  • Values and docs: the unused init.image values and doc rows are removed. init.resources and init.containerSecurityContext stay for the remaining init containers. These charts are added to the 10.6.0 upgrade notes from !5560 (merged).
  • Specs: assert on the projected item paths instead of the configure scripts. Toolbox keeps its configure container until the next step.

The configure scripts only copied files

On master, the Webservice, Workhorse, Sidekiq, Migrations and Geo Log Cursor scripts only run mkdir -p, cp -L, and chmod on the PostgreSQL SSL files.

I replayed master's rendered scripts against the source volumes and compared the result with this branch's projected volumes. The value sets covered defaults, PostgreSQL and Geo SSL, metrics and Workhorse TLS, NATS and Topology Service TLS, Redis and Sentinel TLS, and a dedicated Workhorse Redis instance. Every staged file is projected at the same path. 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.
  • With a dedicated Workhorse Redis instance, workhorse-secrets also holds the global Sentinel TLS files, which Workhorse doesn't read.

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 PostgreSQL client-certificate authentication.
  • 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 Clemens Beck

Merge request reports

Loading
Loading