Make Caproni edit-mode ports env-driven

What does this MR do and why?

Lets several Caproni instances run GitLab edit mode on one host. The Vite port in the commands can now be set per instance through the process environment. The shell default keeps 3036, so single-instance behaviour doesn't change. Comments also document how the Puma, control and exporter ports are chosen.

Follow-up to Caproni mirror.network.incoming.port_mapping (caproni!998 (merged)) and edit-mode process env (caproni!997 (merged)). Overlaps semantically with !256080, which moves these commands into scripts and renames the vite process. Whichever lands second needs to carry the ${VITE_RUBY_PORT:-3036} default.

MR acceptance checklist

  • No runtime change with default settings.
Agent context
  • Caproni config values can't use ${VAR:-default} outside the variables block, and this file can't define variables. So the commands use a shell default escaped as \${VITE_RUBY_PORT:-3036}; Caproni resolves it back to ${VITE_RUBY_PORT:-3036} for bash. The scalars became plain YAML, since \$ is invalid in double quotes.
  • The Puma and Sidekiq assignments are redundant at runtime (they inherit the env and vite_ruby defaults to 3036). They stay so one variable name is used everywhere.
  • caproni config validate passes and config print shows the three commands resolving as above.
  • INTERNAL_PORT and PUMA_CONTROL_PORT are read by the pod's config/puma.rb (copied by .gitlab/caproni/setup.sh) and flow in through process env. Sidekiq doesn't use the Puma control port.
  • Exporter and health-check ports come from monitoring.* settings (config/initializers/1_settings.rb), with no port-specific env var.
  • Not verified at runtime: that a process env entry overrides the mirrored pod env. Edit-mode workhorse still targets localhost:8081.
  • Only branch/MR pipelines are skipped via [skip ci] in the title.
Edited by Dmitry Gruzd

Merge request reports

Loading
Loading