### Prole configuration environments Prole treats `$PROLE_CONF` as an explicit, switchable set of isolated environment configs. #### Directory layout Under `$PROLE_CONF`: ```text $PROLE_CONF/prole.cfg -> symlink entrypoint (active env) $PROLE_CONF/dev/prole.cfg -> base config (dev) $PROLE_CONF/service/prole.cfg -> base config (service) $PROLE_CONF/prod/prole.cfg -> base config (prod) $PROLE_CONF/test/prole.cfg -> base config (test) # Optional overrides (conf.d-style) per environment: $PROLE_CONF//*.cfg -> applied as layered overrides ``` Existing code continues to read `.../prole.cfg` via the single stable entrypoint path: `$PROLE_CONF/prole.cfg`. #### Activation (selecting the active environment) - The active environment is determined by what `$PROLE_CONF/prole.cfg` points to. - The Cluster Environment screen activates the selected env by updating the symlink (via `installer/prole_conf.py`). - Switching environments only changes the symlink target; it does not overwrite any other environment’s curated files. If the entrypoint is a regular file (legacy layout), activation preserves it as `prole.cfg.legacy.` and switches to the symlink-based layout. #### Override layering (deterministic merge) For a selected environment directory `$PROLE_CONF//`: 1. Load `$PROLE_CONF//prole.cfg` (base) 2. Load every other `*.cfg` file in the same directory, in lexicographic filename order Later files override earlier values (last write wins). This makes overrides predictable and reviewable. #### Why this prevents accidental namespace drift - Tests can target an isolated environment (`test`) with its own base config and overrides. - Environment switching is explicit (symlink target changes) and stable (entrypoint path stays the same). - Updates that need to modify config write through the entrypoint symlink to the active environment’s base file, avoiding hidden cross-environment mutations. - The `test` environment defaults to a non-`default` namespace (`prole-test`), reducing the chance that unit/integration runs revert to Kubernetes `default`.