Skip to content

feat: route internet registry verification through proxy - #98

Draft
y-eight wants to merge 1 commit into
mainfrom
feat/proxy-internet-registries
Draft

feat: route internet registry verification through proxy#98
y-eight wants to merge 1 commit into
mainfrom
feat/proxy-internet-registries

Conversation

@y-eight

@y-eight y-eight commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Problem

The webhook could not verify images hosted on internet registries that are only reachable through a forward proxy. While the verification path (go-containerregistry's DefaultTransport) already honors HTTP_PROXY/HTTPS_PROXY/NO_PROXY via http.ProxyFromEnvironment, those env vars were only injected into the init containers (which verify the webhook's own images at startup) — not the main webhook container that verifies pod images at admission time.

Changes

  • chart/templates/deployment.yaml: inject HTTP_PROXY/HTTPS_PROXY/NO_PROXY into the main webhook container (gated by proxy.enabled), matching the init containers.
  • webhook/cosignwebhook.go: make proxy support explicit and self-documenting via proxyTransport() (clones remote.DefaultTransport with http.ProxyFromEnvironment), wired into buildRemoteOpts through remote.WithTransport.
  • chart/values.yaml + README.md: document the .telekom.de use case.

Usage

Set NO_PROXY to reach internal registries directly so only non-*.telekom.de images go through the proxy:

proxy:
  enabled: true
  httpsProxy: "http://proxy.telekom.de:8080"
  noProxy: ".telekom.de"

Verification

  • go build ./...
  • go vet ./webhook/
  • go test ./webhook/
  • helm template renders proxy env on the webhook container and both init containers ✅

The webhook verification path honors HTTP_PROXY/HTTPS_PROXY/NO_PROXY via
go-containerregistry's DefaultTransport, but the proxy env vars were only
injected into the init containers, not the main webhook container that
verifies pod images at admission time.

- Inject proxy env vars into the main webhook container (chart)
- Make proxy support explicit via proxyTransport() in buildRemoteOpts
- Document the .telekom.de NO_PROXY use case

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant