Loading
Commits on Source 3
-
Florian Forster authored
Rework the DSN construction in `clientOptions.newFromProto` to support secrets produced by a variety of PostgreSQL operators. Presets are shipped for CNPG, Crunchy Data, and Zalando; users can also supply a custom field projection via `PostgreSQLSecret.Projection`. Each DSN field is resolved either from inline config (`Host`, `Port`, `DatabaseName`, `Username`) or from a secret field looked up via the projection. `Password` is always resolved from a secret. Errors across all fields are joined so callers see every misconfiguration at once, not just the first. As defense in depth, `resolveSecret` rejects secret references containing a slash to prevent path traversal into other secret namespaces. The schema already constrains secret names to valid Kubernetes resource names. Depends on the matching Fairway schema change in gitlab-com/gl-infra/platform/runway/fairway!63, which introduces `PostgreSQLSecret`, `PostgreSQLFormat`, and `PostgreSQLProjection` and turns `PostgreSQL.Host` into a `*string`. The `go.mod` entry points at a pre-release commit until that MR is merged and tagged. Issue: gitlab-com/gl-infra/platform/runway/team#873
-
Florian Forster authored
-
Elliot Forbes authored
feat(postgres): Support multiple PostgreSQL operator secret formats. See merge request !484 Merged-by:
Elliot Forbes <eforbes@gitlab.com>
Approved-by:
Elliot Forbes <eforbes@gitlab.com>
Co-authored-by:
Florian Forster <fforster@gitlab.com>