Repository navigation
🐛 Fix AuthBridge sidecar injection for tools - #1169
Conversation
Two fixes for tool workloads with AuthBridge enabled: 1. Backend: Add _ensure_authbridge_configmaps() calls in the tool creation and Shipwright finalize paths. Without this, tool pods deployed via the UI in namespaces without pre-existing ConfigMaps would get sidecars injected but the sidecars would fail to start (missing authbridge-config, envoy-config, spiffe-helper-config). 2. UI: Update AuthBridge checkbox description in ImportAgentPage and ImportToolPage to reflect that client-registration is now managed by the operator (kagenti-extensions PR #262), not injected as a sidecar by default. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Mariusz Sabath <[email protected]>
pdettori
left a comment
There was a problem hiding this comment.
Clean, focused bug fix. Adds _ensure_authbridge_configmaps() calls to the two tool-creation paths in tools.py (create_tool and finalize_tool_shipwright_build), matching the existing pattern in agents.py. UI descriptions correctly updated to reflect operator-managed client-registration.
Areas reviewed: Python (backend), Frontend (TSX), Security, Commit conventions
CI status: All checks passing
One non-blocking suggestion below — otherwise LGTM.
| resolve_clone_secret, | ||
| ) | ||
| from app.utils.routes import create_route_for_agent_or_tool, route_exists | ||
| from app.routers.agents import _ensure_authbridge_configmaps |
There was a problem hiding this comment.
suggestion: _ensure_authbridge_configmaps is a private function (leading underscore) being imported cross-module. Consider promoting it to a shared utility (e.g., app/utils/authbridge.py) or dropping the underscore — it now has call-sites in both agents.py and tools.py.
Non-blocking for this bug fix; can be addressed in a follow-up.
Summary
Fix AuthBridge sidecar injection for tool workloads and correct the AuthBridge
checkbox description in the import UI.
Key changes:
_ensure_authbridge_configmaps()calls to the tool creation and Shipwrightfinalize paths in
tools.py, matching the existing pattern inagents.py. Withoutthis, tool pods in namespaces without pre-existing ConfigMaps would get sidecars
injected but they would fail (missing authbridge-config, envoy-config,
spiffe-helper-config).
ImportAgentPage.tsxandImportToolPage.tsxto reflect that client-registration is now operator-managedby default (per kagenti-extensions PR 🐛 fix setting up mcp inspector proxy URL #262), not injected as a sidecar.
Related issue(s)
Fixes #1143
Fixes #1167 (Gap 1)
Part of #1168