Loading
Commits on Source 3
-
Florian Forster authored
Adds an `Addrs` method to the Redis `authnFormat` interface so client addresses can be delivered through the mounted secret rather than only the infrastructure proto. `configFromProto` now calls `pf.Addrs` instead of reading `cfg.GetAddrs()` directly. When the proto carries addresses they are used as-is; otherwise `authenticatedFormat` reads the secret key named by the projection's `addrs` field and parses a comma-separated `<host>:<port>` list, trimming whitespace around each entry. `noSecretFormat` continues to return only the proto addresses. This supports provisioned endpoints whose address is not known at config time and arrives via the secret alongside the credentials. Extracts a `config()` helper for the shared nil-infra / nil-Redis checks used by both `AuthConfig` and `Addrs`, plus a `resolveSecret` helper that resolves an arbitrary projection field through the secret provider. Bumps `fairway` to v1.30.0 for the `addrs` projection field. Adds table tests for both formats covering proto passthrough, single and comma-separated secret values, whitespace trimming, and the missing provider, missing projection field, and key-not-found error paths. Issue: gitlab-com/gl-infra/platform/runway/team#931
-
Florian Forster authored
Previously, splitting the secret value on commas kept empty entries, so a value with stray, doubled, or trailing commas yielded empty address strings that were passed to the Redis client as invalid addresses. Empty entries are now dropped after trimming, and a value that resolves to no addresses returns the new `ErrEmptyAddresses` sentinel with the raw value included for debugging. Adds tests for stripping interleaved empty entries and for the all-empty value returning an error. Issue: gitlab-com/gl-infra/platform/runway/team#931
-
Luke Hollinda authored
feat(redis): Resolve client addresses from the secret projection. See merge request !551 Merged-by:
Luke Hollinda <lhollinda@gitlab.com> Approved-by:
Matthew J. Hoad <mhoad@gitlab.com> Approved-by:
Luke Hollinda <lhollinda@gitlab.com> Reviewed-by:
GitLab Duo <gitlab-duo@gitlab.com> Co-authored-by:
Florian Forster <fforster@gitlab.com>