Repository navigation
feat(featureflags): refactor feature flag configs + add pause_scheduling_enabled flag - #850
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new global feature flag, pause_scheduling_enabled, across multiple microservices (Actuator, ESS, Health Service, UI, and Reconciler). It adds a unified Go package for feature flags, updates configuration loaders, adapts the UI service and configuration generation scripts, and configures Helm charts and Cluster Toolkit blueprints to deploy the new flag. The review feedback highlights critical precedence issues in environment variable loading: in Go, an explicit false for the lowercase variable can be incorrectly overridden by an uppercase variable, which should be resolved using os.LookupEnv; similarly, in the Python development server, the fallback logic should be aligned with the production shell script to ensure consistent behavior.
d8e503c to
11bf204
Compare
Establish the global configuration toggle pause_scheduling_enabled (default false) exposed via Cluster Toolkit blueprint and Helm values. - Create dedicated feature-flags-config ConfigMap in Helm templates. - Introduce internal/featureflags package to provide unified flag loading. - Inject feature flags into Actuator, ESS, Health Service, UI, and Reconciler deployments. - Expose pauseSchedulingEnabled in UI dev server, Nginx entrypoint, and Angular FeatureFlagService. - Add unit tests for UI dev server and internal feature flags package. TAG=agy
11bf204 to
9506300
Compare
There was a problem hiding this comment.
env var naming question
…AUSE_SCHEDULING_ENABLED - Update feature-flags-config ConfigMap key to XMC_PAUSE_SCHEDULING_ENABLED. - Update internal/featureflags PauseSchedulingFlagName to XMC_PAUSE_SCHEDULING_ENABLED. - Update UI runtime config generation (generate_config.sh, server.py) and unit tests. TAG=agy CONV=839c31e5-dcac-4b74-a385-78e900c16630
Reasoning:
Currently adding a feature flag that is used by multiple services requires changes in a lot of files (each service requires changes in its manifest, config etc). This PR proposes moving feature flags to dedicated config maps, separating feature flag loading to a shared package and loading this package in each service config.go. This limits the amount of changes required next time to single config map and one golang file. Some places were untouched and will still require changes in the future: helm, ctk, frontend scripts.