=== Description
The backend of Test Kitchen UI polls the GrowthBook REST API on startup and at a configurable interval to sync experiment configuration. The API requires a Bearer token for authentication. The token is read from the `GROWTHBOOK_API_KEY` environment variable at startup (see `config/configuration.js` in [[ https://gitlab.wikimedia.org/repos/data-engineering/test-kitchen/-/merge_requests/325/diffs#f1be3fd85f9adf7cda8989001748cae8eef25084 | prospective MR ]]). If the variable is not set, the application [[ https://gitlab.wikimedia.org/repos/data-engineering/test-kitchen/-/merge_requests/325/diffs#caa34b1dc03db07aa00aa2dafa95b176362ee60e_0_27 | logs an error ]] and the [[ https://gitlab.wikimedia.org/repos/data-engineering/test-kitchen/-/merge_requests/325/diffs#caa34b1dc03db07aa00aa2dafa95b176362ee60e_0_26 | poller will fail to authenticate ]].
The placeholder `<growthbook-api-key>` in [[ https://gitlab.wikimedia.org/repos/data-engineering/test-kitchen/-/merge_requests/325/diffs#cf1972f45f2104de2470a5055cb5d2648a29f221 | config.prod.yaml ]] and [[ https://gitlab.wikimedia.org/repos/data-engineering/test-kitchen/-/merge_requests/325/diffs#288851e4fea46e12901efb8e80d5405f8587de22 | config.dev.yaml ]] documents where the value is expected. The real key must be injected via the deployment system.
=== Technical Notes
The API key can be found in the GrowthBook instance under Settings >> API Keys (https://growthbook.wikimedia.org/settings/keys).
Staging and production should probably use different keys depending on which GrowthBook environment they point to.
=== Acceptance Criteria
[] The `GROWTHBOOK_API_KEY` is set as a Kubernetes secret and mounted as an environment variable in the Test Kitchen UI pod for both staging and production
[] The GrowthBook poller successfully authenticates and syncs experiment configuration on startup for both staging and production