Summary
We support configuration via environment variables to simplify the setup of multiple services. This allows both flagd and its providers to share configuration options by using the same environment variable names. However, there is a conceptual mismatch concerning port configuration, which leads to inconsistent and potentially insecure behavior.
Observed Behavior
Expected Behavior
- Adapt the configuration gherkin tests in the testbed to reflect this correct behavior.
- Update provider implementations to:
- Correctly distinguish between
FLAGD_PORT (for the main port/remote mode) and FLAGD_SYNC_PORT (for sync/in-process providers).
- Ensure that environment variables are mapped appropriately and consistently between
flagd and its providers.
Steps to Reproduce
No response provided
Additional Context
The differentiation between port and syncPort was designed for enhanced security and clarity, but the uniform use of FLAGD_PORT for all scenarios undermines this intention.
Summary
We support configuration via environment variables to simplify the setup of multiple services. This allows both
flagdand its providers to share configuration options by using the same environment variable names. However, there is a conceptual mismatch concerning port configuration, which leads to inconsistent and potentially insecure behavior.Observed Behavior
General Approach:
Environment variables are used to configure both
flagdand its providers. Typically, providers use the same variable names (FLAGD_*) asflagdfor options such as the port.Port Configuration:
flagdexposes two relevant configuration options:port: Used for the primary server port.syncPort: Used for synchronization (RPC) mode.Current Implementation:
port, mapped to the environment variableFLAGD_PORT.FLAGD_SYNC_PORTinstead ofFLAGD_PORT. Currently, this is not the case.Resulting Problem:
Expected Behavior
FLAGD_PORT(for the main port/remote mode) andFLAGD_SYNC_PORT(for sync/in-process providers).flagdand its providers.Steps to Reproduce
No response provided
Additional Context
The differentiation between
portandsyncPortwas designed for enhanced security and clarity, but the uniform use ofFLAGD_PORTfor all scenarios undermines this intention.