Serve postgres's consumers the port its server is published on, not the container's 5432 (issue 957)
mesh/merge-gate head deb2020bd47d merged into trunk 5652a1494493 — pass: builds postgres, sent nowhere; no bus step; 2 wait(s) for a person; every machine …
mesh/repo-check head deb2020bd47d merged into trunk 5652a1494493 — pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-…
mesh/delivery delivered

On novox postgres is published 6852:5432; handed 5432, gitea and keycloak reached
nothing once their files were filled from postgres's entry.
This commit is contained in:
lead-57
2026-10-16 21:56:15 +02:00
parent 9acd1f51c5
commit deb2020bd4
4 changed files with 66 additions and 20 deletions
@@ -23,13 +23,13 @@ import (
// ProvisionName is what postgres provides, as its manifest says.
const ProvisionName = "postgres-database"
// servedPort is the port its manifest serves (`serves.postgres-database.port`).
const servedPort = 5432
// moved is postgres handed to the provisioner: the SDK's moved path (harness.Moved) answering its consumers, and the
// harness (never run) whose retirement and tools it shares. consumersFile is where its machine's client fills its
// consumers. What differs from keycloak is only this declaration (issue 849).
func moved(consumersFile string, h *harness.Harness) (*harness.Moved, *provider.Provider, provider.Bus, error) {
//
// It serves its consumers the port its server is published on, on its machine (servedPort), never the container's
// own 5432: on a machine that publishes it elsewhere (6852:5432 on novox) nothing answers 5432 (issue 957).
func moved(consumersFile string, h *harness.Harness, servedPort int) (*harness.Moved, *provider.Provider, provider.Bus, error) {
return harness.NewMoved(consumersFile, h, harness.MovedSpec{Module: "postgres", Provision: ProvisionName,
Offer: provider.Offer{Credential: provider.PerConsumer, Serves: map[string]any{"port": servedPort}},
Login: func(e provider.Entry) string { return e.User },