feat: support request-aware registry configuration #160
All Vouch review confidence checks passed
Residual risk 0.32 = Change Risk (0.73) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.73 · 562 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.379
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.073
Real PR Conversation Timeline
1 comments
"Review active on #160"
general
weight: 0.35
JimBugwadia
Consumers that apply request-specific registry checks currently need to rebuild the SDK credential chain or copy registry client code. This change lets them keep those operations in the SDK while supplying a transport and a wrapper around the completed credential chain.
WithKeychainWrapperruns after Secret/provider/custom-keychain composition and preserves contextual resolution.NewRemoteOptionssupplies reusable options without capturing a request context or puller/pusher; image loaders bind each evaluation context when making a request.Secret keychains now implement
authn.ContextKeychainand forward the request context when the caller-supplied namespace lister implements the optionalContextSecretNamespaceLister.GetWithContextmethod. Ordinary informer listers keep using their in-memoryGet. The existing refresh behavior is preserved: the reusable outer keychain stores lister/reference configuration, and each resolution rereads the current Secrets and builds its inner credential keychain. Informer-backed credentials reflect updates after the cache receives them. Missing Secrets are skipped; other lookup failures stop resolution. Cancellation is checked before each read and before returning credentials or allowing fallback.Existing constructor defaults, the
Clientinterface, credential precedence, tracing and provider selection are preserved. Cloud-provider HTTP-client configuration remains a separate concern.Included transport changes
This PR includes both commits from #142 as cherry-picks:
WithTransportfor custom registry HTTP transports.Nishant JS's original authorship and DCO signoffs are preserved. This PR adds completed-keychain wrapping, request-aware Secret resolution and reusable remote options on top; those additional changes are available as a separate comparison.
This PR is self-contained and can merge without merging #142 separately. If this PR is merged, #142 can be closed as superseded because its implementation and test are already included here.
Kyverno consumers
setupRegistryClientpaths still supply informer listers.Validation
GOTOOLCHAIN=go1.26.9 go test -race -count=1 -p 2 ./extensions/regcreds ./extensions/registryclientpassed.make fmt, changed-file import formatting and whitespace checks passed.No live cloud exchange or deployed conformance run is claimed.
Assisted by OpenAI Codex.