Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add database replica URLs #337

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

rolodato
Copy link
Member

Changes

Do not release until Flagsmith/flagsmith#5222 is released.

Adds support for defining replicas using the databaseExternal.replicas.databases and databaseExternal.crossRegionReplicas.databases values. We accept the same formats as databaseExternal for the primary database (plaintext URL, key/value components, or secret reference).

Also removes the E2E tests from this repository, since they're testing things outside the scope of the Helm chart. We can add Helm-specific tests if we need to, such as the ones added by this PR.

How did you test this code?

Helm tests.

@rolodato rolodato requested a review from a team as a code owner March 12, 2025 18:54
@rolodato rolodato requested review from khvn26 and removed request for a team March 12, 2025 18:54
@rolodato rolodato changed the title feat: Add replica URLs feat: Add database replica URLs Mar 12, 2025
@rolodato
Copy link
Member Author

Confirmed these tests are running and passing in CI - see https://github.com/Flagsmith/flagsmith-charts/actions/runs/13819367403/job/38660668849?pr=337#step:9:2399

Comment on lines +7 to +11
devPostgresql:
enabled: true

databaseExternal:
replicas:
Copy link
Member

Choose a reason for hiding this comment

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

I'm curious we're testing integrated postgres enabled + replicas and not external postgres + replicas here.

Copy link
Member Author

Choose a reason for hiding this comment

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

The dev postgres is only so that there's an actual database we can use while running the tests. If we remove this, or refer to a non-existing external database, the API containers cannot come up and the tests fail.

In any case, we're not testing anything relating to the primary database (integrated or external). We're only testing that if you pass in the Helm values for replicas in different formats, then the API containers will have the correct environment variables set on them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants