Skip to content

Conversation

@rolodato
Copy link
Contributor

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 changed the title feat: Add replica URLs feat: Add database replica URLs Mar 12, 2025
@rolodato
Copy link
Contributor 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
Contributor 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.

@rolodato rolodato requested a review from khvn26 March 27, 2025 23:45
@rolodato rolodato force-pushed the feat/replica-urls-json branch from 545800b to 571b091 Compare April 16, 2025 17:01
@rolodato rolodato force-pushed the feat/replica-urls-json branch from 571b091 to 7ad6ab7 Compare April 16, 2025 17:04
@rolodato
Copy link
Contributor Author

rolodato commented Jul 8, 2025

Tests are passing and this is ready to ship: https://github.com/Flagsmith/flagsmith-charts/actions/runs/16151118638/job/45582380606?pr=337#step:9:267

@khvn26 could you have another pass at this when you have the chance?

@matthewelwell
Copy link
Contributor

I don't think that we should merge this until we have a solution to this issue.

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.

4 participants