fix(infra): wire tracker-api → real Core + MasterDataDb on local kind#74
Merged
Conversation
Deploying the Tracker onto the same kind cluster as the Evolith Core, wired to the REAL stateless Core (not the default stub), verified end-to-end. - values-local: coreApi/agentRuntime baseUrl → the real in-cluster services in the evolith-local namespace (cross-namespace FQDN); existingSecretName supplies the API key the Core requires (401 otherwise). - deployment: wire ConnectionStrings__MasterDataDb (the tenant-projection context, DS-07). It was unset, so TenantProjectionMigrator defaulted to localhost:5432 and crashlooped; now it shares the local Tracker Postgres (a dedicated DB is a prod concern). Verified on kind: POST /api/core/evaluate → real POST core-api /api/v1/evaluate (SecurityAudit 200 ALLOW, from the tracker pod) → CoreEvaluationTransaction persisted (status=completed) in tracker_governance.core_evaluation_transactions. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…isting break) DS-07 introduced a second DbContext (TenantProjectionDbContext for the MasterData tenant-projection schema) alongside TrackerDbContext, but the 'Apply EF Core migrations' step still ran 'dotnet ef database update' with no --context. dotnet-ef aborts with 'More than one DbContext was found', which was red on main for every PR. Apply each context explicitly against the CI DB. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…text After disambiguating the EF migrate step, TenantProjectionDbContext (DS-07) failed with 28P01 auth against user 'postgres' because ConnectionStrings__MasterDataDb was unset and defaulted to localhost/postgres. Point it at the same CI Postgres (as DefaultConnection) — the CI analog of the local-kind Helm wiring in this PR. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ets CI DB
Setting ConnectionStrings__MasterDataDb env was insufficient: at design time
GetConnectionString("MasterDataDb") still resolves null and the context falls
back to localhost/postgres (28P01). Pass --connection explicitly to dotnet ef so
both contexts apply against the CI Postgres deterministically.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Qué
Cablea el chart
evolith-tracker-apipara que, en el cluster kind local, el BFF del Tracker gobierne contra el Core real (no los stubs por defecto) y arranque sin crashloop.Cambios (solo Helm, 2 archivos)
values-local.yamlcoreApi.baseUrl→http://evolith-core-api-evolith-core-api.evolith-local.svc.cluster.local/api/v1(Core real cross-namespace vía FQDN) +existingSecretName: tracker-core-auth(API key requerida, 401 sin ella).agentRuntime.baseUrl→ servicio real del agent-runtime enevolith-local+existingSecretName: tracker-runtime-auth.templates/deployment.yamlConnectionStrings__MasterDataDb(mismo secret-db). Sin esto,TenantProjectionMigrator(DS-07) cae alocalhost:5432y hace crashloop. En local broker-less comparte el Postgres del Tracker; una BD dedicada es una preocupación de prod.Evidencia (Objetivo 1 end-to-end en kind)
Con estos valores, la cadena quedó verificada:
POST /api/core/evaluate(Tracker BFF) →POST core-api /api/v1/evaluatereal (200 ALLOW, SecurityAudit, desde IP del pod Tracker) →CoreEvaluationTransaction(status=completed) persistida entracker_governance.core_evaluation_transactions.Alcance / notas
values-local.yaml(overrides de kind) — no toca defaults de prod.TrackerDbMigratorhosted-service + su registro enDependencyInjection.cs) que no forma parte de este fix de infra.🤖 Generated with Claude Code