feat: migrate quotes-backend from GCP SQL to pgrator Postgres#304
Open
Starefossen wants to merge 1 commit into
Open
feat: migrate quotes-backend from GCP SQL to pgrator Postgres#304Starefossen wants to merge 1 commit into
Starefossen wants to merge 1 commit into
Conversation
Replace the gcp.sqlInstances block with a Postgres CR managed by pgrator and wire it to the app via spec.postgres.clusterName. Env var mapping added for backward compatibility: - PGJDBCURL → DB_JDBC_URL - PGUSER → DB_USERNAME - PGPASSWORD → DB_PASSWORD Also adds extra-resources support to the reusable pipeline so the Postgres CR is deployed alongside the app. Co-authored-by: Copilot <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Migrate the quotes-backend from GCP Cloud SQL (
gcp.sqlInstances) to pgrator-managed Postgres (data.nais.io/v1 PostgresCR +spec.postgres.clusterName).This tests the full pgrator → naiserator flow end-to-end with a real app.
Changes
quotes-backend/.nais/postgres.yaml— new Postgres CR (PostgreSQL 17, 2Gi disk, nb_NO collation)quotes-backend/.nais/app.yaml— replacedgcp.sqlInstanceswithpostgres.clusterName: quotes-backend-db+ env var mappings (PGJDBCURL→DB_JDBC_URL,PGUSER→DB_USERNAME,PGPASSWORD→DB_PASSWORD).github/workflows/service-pipeline.yaml— addedextra-resourcesinput for additional deploy resources.github/workflows/quotes-backend.yaml— passespostgres.yamlas extra resourceTesting
Deploying this will exercise:
active-engineannotation