Skip to content

fix: Proxy-sidecar reinvocation check and routes volume mount#303

Merged
huang195 merged 1 commit intomainfrom
fix/proxy-sidecar-gaps
Apr 21, 2026
Merged

fix: Proxy-sidecar reinvocation check and routes volume mount#303
huang195 merged 1 commit intomainfrom
fix/proxy-sidecar-gaps

Conversation

@huang195
Copy link
Copy Markdown
Contributor

Summary

  • Add AuthBridgeProxyContainerName to isAlreadyInjected check in the webhook handler
  • Add authproxy-routes volume mount to BuildProxySidecarContainerWithPorts

Bugs found during end-to-end testing

1. Reinvocation gap: isAlreadyInjected checked for envoy-proxy, spiffe-helper, client-registration, and authbridge containers — but not authbridge-proxy. If spiffe-helper is disabled, webhook reinvocation would not recognize the proxy-sidecar container and could double-inject.

2. Missing routes volume: The proxy-sidecar container only mounted shared-data, authbridge-runtime-config, and svid-output. The authproxy-routes ConfigMap (/etc/authproxy/routes.yaml) was not mounted, so file-based route loading was broken. Inline routes via routes.rules in the ConfigMap worked as a workaround.

Test plan

  • go build — passes
  • go test ./internal/webhook/injector/ — passes
  • golangci-lint — 0 issues
  • E2E: deploy with proxy-sidecar mode + authproxy-routes ConfigMap, verify routes are loaded from file

Assisted-By: Claude (Anthropic AI) noreply@anthropic.com

…es volume

Two proxy-sidecar gaps found during end-to-end testing:

1. isAlreadyInjected did not check for AuthBridgeProxyContainerName.
   On webhook reinvocation with spiffe-helper disabled, the proxy-
   sidecar container would not be recognized as already-injected,
   causing a second injection pass.

2. BuildProxySidecarContainerWithPorts did not mount the authproxy-
   routes volume. File-based route loading (routes.file in config)
   was broken in proxy-sidecar mode. Adds /etc/authproxy mount
   matching the envoy-sidecar container.

Signed-off-by: Hai Huang <hai@us.ibm.com>
Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Hai Huang <huang195@gmail.com>
@huang195 huang195 marked this pull request as ready for review April 21, 2026 17:56
@huang195 huang195 requested a review from a team as a code owner April 21, 2026 17:56
@huang195 huang195 merged commit 872d8df into main Apr 21, 2026
16 checks passed
@huang195 huang195 deleted the fix/proxy-sidecar-gaps branch April 21, 2026 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants