prole/docs/config-environments.md
chrisfu e3c2e625f1 refactor(config): separate k3d k3s and gke config entrypoints
Rename env config files from conf/*/prole.cfg to conf/k3d.cfg, conf/k3s.cfg, and conf/gke.cfg. Update shell/Python loaders and etc/deploy scripts to resolve named configs cleanly while keeping legacy fallback behavior. Align k3s Ansible tasks, docs, and regression coverage with the new configuration layout.

Co-authored-by: Junie <junie@jetbrains.com>
2026-04-11 22:20:45 -07:00

1.7 KiB

Prole configuration environments

Prole treats $PROLE_CONF as an explicit set of deployment-specific configs.

Directory layout

Under $PROLE_CONF:

$PROLE_CONF/k3d.cfg                   -> base config (k3d / dev)
$PROLE_CONF/k3s.cfg                   -> base config (k3s / service)
$PROLE_CONF/gke.cfg                   -> base config (k8s / prod)
$PROLE_CONF/test.cfg                  -> base config (test, optional)

Legacy layouts are still recognized for compatibility:

$PROLE_CONF/prole.cfg                 -> legacy entrypoint
$PROLE_CONF/<env>/prole.cfg           -> legacy env base config

Activation (selecting the active environment)

  • The active environment is inferred from CLUSTER_ENV, PROLE_MODE, or DEPLOYMENT_MODE.
  • Resolution prefers named root files (k3d.cfg, k3s.cfg, gke.cfg) and only falls back to legacy prole.cfg paths.
  • Switching environments changes which named file is selected; it does not overwrite other environment configs.

If a legacy prole.cfg regular file is detected, migration preserves it as prole.cfg.legacy.<timestamp> and promotes content into the appropriate named file.

Override layering (deterministic merge)

  • Named root configs (k3d.cfg, k3s.cfg, gke.cfg, test.cfg) are loaded directly.
  • Legacy env-directory layout still supports layered *.cfg overrides in lexicographic filename order.

Later files override earlier values (last write wins).

Why this prevents accidental namespace drift

  • k3d, k3s, and k8s/GKE are cleanly separated by dedicated config files.
  • Mode/environment selection is explicit via deployment hints instead of mutable symlink state.
  • Legacy configs remain readable during transition, reducing migration risk.