From a6206a217a176700dc1bcc45be3f8d1e66e2c6f4 Mon Sep 17 00:00:00 2001 From: jwbron <8340608+jwbron@users.noreply.github.com> Date: Mon, 9 Feb 2026 02:39:06 +0000 Subject: [PATCH] docs: Document egg_config constants module [doc-updater] Add documentation for the constants module in shared/egg_config/README.md. The constants module provides centralized definitions for ports, network names, and container configuration that are used throughout the codebase. This update was prompted by PR #399 which refactored hardcoded port values to use GATEWAY_PORT constant, highlighting that the constants module was undocumented. Authored-by: egg --- shared/egg_config/README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/shared/egg_config/README.md b/shared/egg_config/README.md index db0fff56ef..593475657b 100644 --- a/shared/egg_config/README.md +++ b/shared/egg_config/README.md @@ -9,6 +9,7 @@ Unified configuration framework for egg services. - **Validation** with clear error messages - **Health checks** to verify API connectivity - **Secret masking** in logs and debug output +- **System constants** for ports, network names, and container configuration ## Quick Start @@ -78,6 +79,28 @@ CONFLUENCE_API_TOKEN="your-atlassian-api-token" GATEWAY_SECRET="your-gateway-secret" ``` +## System Constants + +The `constants` module provides centralized definitions for ports, network names, and container configuration: + +```python +from egg_config.constants import GATEWAY_PORT, GATEWAY_PROXY_PORT +from egg_config.constants import EGG_ISOLATED_NETWORK, EGG_EXTERNAL_NETWORK + +# Use in code instead of hardcoding values +health_url = f"http://localhost:{GATEWAY_PORT}/api/v1/health" +``` + +Available constants: +- `GATEWAY_PORT` (9848) - Gateway HTTP API port +- `GATEWAY_PROXY_PORT` (3129) - Gateway filtering proxy port +- `GATEWAY_CONTAINER_NAME`, `GATEWAY_IMAGE_NAME` - Container identifiers +- `EGG_ISOLATED_NETWORK`, `EGG_EXTERNAL_NETWORK` - Docker network names +- `EGG_ISOLATED_SUBNET`, `EGG_EXTERNAL_SUBNET` - Network CIDR ranges +- `EGG_CONTAINER_IP`, `GATEWAY_ISOLATED_IP`, `GATEWAY_EXTERNAL_IP` - Fixed IP addresses + +See `shared/egg_config/constants.py` for the full list. + ## Available Configs | Config | Purpose | Key Fields |