fix: add keystorePool supported regions configuration#336
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR adds keystorePool.supportedRegions configuration so CMK can return BYOK supported regions to the UI before the first keystore is created (avoiding the current chicken-and-egg dependency on pool retrieval).
Changes:
- Add
keystorePool.supportedRegionstoconfig.yamlusing an embedded value (local dev). - Add
keystorePool.supportedRegionsto Helm chart values using a file-based source (deployed environments).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| config.yaml | Adds keystorePool config including embedded supported-regions payload for local development. |
| charts/cmk/values.yaml | Enables keystorePool in chart values and configures supported regions via a mounted file for deployed environments. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| supportedRegions: | ||
| source: embedded | ||
| value: | | ||
| { | ||
| "regions": [ | ||
| {"name": "Europe (Frankfurt)", "technicalName": "eu-central-1"}, | ||
| {"name": "Europe (Ireland)", "technicalName": "eu-west-1"}, | ||
| {"name": "Europe (London)", "technicalName": "eu-west-2"}, | ||
| {"name": "United States (N. Virginia)", "technicalName": "us-east-1"}, | ||
| {"name": "United States (Ohio)", "technicalName": "us-east-2"} | ||
| ] | ||
| } | ||
|
|
| supportedRegions: | ||
| source: file | ||
| file: | ||
| path: /etc/credentials/keystore-plugins/management/supported-regions | ||
| format: binary |
What this PR does / why we need it:
This PR fixes a chicken-and-egg problem where the UI cannot display supported regions for BYOK key creation before the first key is created.
Previously, the /keystores endpoint returned empty supportedRegions because the keystore configuration is only retrieved from the pool when the first BYOK key is created. However, the UI needs this list to
populate the region dropdown before any key exists.
The solution adds a keystorePool.supportedRegions configuration that allows CMK to return the supported regions list without requiring a keystore to be retrieved from the pool. This configuration:
This ensures the UI can display available regions immediately when BYOK is enabled, without wasting pool resources for tenants that never use BYOK.
Special notes for your reviewer:
Release note:
fix: BYOK supported regions are now available in the UI before creating the first key