Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Deployment environment

Name a deployment’s environment (dev, pre, prod) so that every door shows it: nobody cuts a session, lifts a ban or uploads a file in production believing they are in development.

[server.environment]
name = "PROD"
color = "red"

All keys: Reference [server.environment].

WhereWhat is shown
Consolea 4 px frame in the colour around the window, visible while scrolling; a banner at the top of every page, the name in bold; the header and the sidebar tinted; the title [PROD] CraftFileGate Admin
Explorerthe same frame, a discreet banner, the bar tinted, the title prefixed [PROD]
Tab iconthe diamond in the colour, in the console and the explorer
Console confirmationsthe name in the dialog’s title: Lift the ban of 10.0.0.7 on PROD?, likewise to cut a session or a transfer, revoke an account’s console sessions, revoke a temporary access
SFTPbefore authentication, the banner CraftFileGate — PROD, shown by WinSCP, FileZilla, sftp; sftp_banner = false turns it off, for a script that refuses it
APIenvironment ({"name": "PROD", "color": "red"}) in GET /admin/status and GET /admin/me; the header X-CraftFileGate-Environment: PROD on every answer of the HTTP doors
Auditthe environment field on every audit line (json format); the INFO line deployment environment in force at startup
Metricsdeployment.environment.name in the OTLP resource; craftfilegate_environment_info{environment="PROD"} 1 on /metrics, for a join: the other series carry no label, the scrape adds its own
Several instancesa peer announcing another environment is refused: status environment_mismatch, no exchange; a dev pod does not join the prod cluster through a DNS or certificate mistake

Setting or changing name on a running cluster splits it for the length of the rollout: the pods already restarted and the others see each other as environment_mismatch (one ERROR line per peer) and share nothing, neither bans, sessions nor relayed console actions, until the last pod has restarted.

The colour

  • red, orange, yellow, green, blue, gray: one shade per theme, light and dark, the banner’s text white or black, its contrast checked (at least 4.5:1, the frame at least 3:1 on the page).
  • #RRGGBB: the same in both themes, the text white or black, whichever contrasts more.
  • Without color: gray. The colour never goes without the name: a colour-blind reader reads the name.

Without [server.environment], nothing is shown: no frame, no banner, the blue icon, no header, environment is null.

Kubernetes

The chart writes environment.name, environment.color and environment.sftpBanner of its values into config.inline:

environment:
  name: PROD
  color: red
  sftpBanner: true

With config.existingConfigMap or config.existingSecret, write [server.environment] yourself in that config.toml.