Skip to content

fix: add keystorePool supported regions configuration#336

Open
mjakobczyk wants to merge 2 commits into
mainfrom
fix/keystore-pool-supported-regions
Open

fix: add keystorePool supported regions configuration#336
mjakobczyk wants to merge 2 commits into
mainfrom
fix/keystore-pool-supported-regions

Conversation

@mjakobczyk

Copy link
Copy Markdown

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:

  • For deployed environments: references the same file used by the keystore management plugin (/etc/credentials/keystore-plugins/management/supported-regions)
  • For local development: uses an embedded configuration with the supported regions list

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:

  • The code to support this configuration already exists in internal/manager/tenantconfigs.go (lines 200-215)
  • This PR only adds the missing configuration section
  • The values.yaml uses a file-based source (production), while config.yaml uses embedded source (local dev)
  • Verify that the JSON structure matches what the code expects: {"regions": [{"name": "...", "technicalName": "..."}]}

Release note:
fix: BYOK supported regions are now available in the UI before creating the first key

Copilot AI review requested due to automatic review settings July 17, 2026 20:43
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ea2cab11-7344-499f-98d4-d903c119d3fb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.supportedRegions to config.yaml using an embedded value (local dev).
  • Add keystorePool.supportedRegions to 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.

Comment thread config.yaml
Comment on lines +226 to +238
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"}
]
}

Comment thread charts/cmk/values.yaml
Comment on lines +883 to +887
supportedRegions:
source: file
file:
path: /etc/credentials/keystore-plugins/management/supported-regions
format: binary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working helm-chart

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants