Repository navigation
Docs(authbridge): add sidecar injection reference page - #2154
Conversation
clawgenti
left a comment
There was a problem hiding this comment.
Adds the operator SPIFFE auth bootstrap Job and a well-written sidecar-injection.md reference page. Four issues found in the new Helm Job template that need attention before merge.
- must-fix
curlimages/curl:latestdoes not shipjq; the bootstrap script callsjq -sRr @urito URL-encode the client ID (lines 157, 200) and willcommand not foundat runtime. Use an image that includes both curl and jq (e.g.dwdraju/alpine-curl-jqor a custom image), or replace thejqcall with a POSIX-safe URL encoder likepython3 -c 'import urllib.parse,sys; print(urllib.parse.quote(sys.argv[1]))' "$OPERATOR_CLIENT_ID". - must-fix
serviceAccountName: default— the Job readskeycloak-initial-adminsecret in the keycloak namespace and makes admin API calls; thedefaultSA almost certainly lacksget secretRBAC. Add a dedicatedServiceAccount+Role/RoleBindinggrantinggetonsecrets/keycloak-initial-adminin the keycloak namespace, or document that the operator is expected to pre-create this. - suggestion IDP existence check (step 2) only branches on
404; a403(token expired or insufficient scope) or5xxwill fall through to the "already exists" path and silently continue with a bad token. Add an explicit error branch:if [ "$IDP_HTTP_CODE" != "200" ] && [ "$IDP_HTTP_CODE" != "404" ]; then echo "ERROR..."; exit 1; fi. - suggestion
spireTrustDomain: localtest.meis added as a new top-level key invalues.yaml, butkagenti-operator-chart.signatureVerification.spireTrustDomainalready fulfils the same role. The new key is referenced only inside the bootstrap Job template'sOPERATOR_CLIENT_IDdefault. Consider referencing the existing nested key (.Values.kagentiOperatoralready reads.Values.spireTrustDomain) or consolidating to avoid two canonical locations for the same value.
Reviewed by clawgenti using github:pr-review
| serviceAccountName: default | ||
| containers: | ||
| - name: bootstrap | ||
| image: {{ .Values.kagentiOperator.spiffeAuth.bootstrapImage | default "curlimages/curl:latest" }} |
There was a problem hiding this comment.
must-fix curlimages/curl:latest does not include jq. The bootstrap script uses jq -sRr @uri at lines 157 and 200 to URL-encode $OPERATOR_CLIENT_ID for the client search API call. This will fail with sh: jq: not found at runtime. Use an image that bundles both curl and jq, or replace the jq invocation with a POSIX-safe alternative (e.g. python3 -c 'import urllib.parse,sys; print(urllib.parse.quote(sys.argv[1]))' "$OPERATOR_CLIENT_ID" — python3 is available in most base images).
There was a problem hiding this comment.
The bootstrap Job does not use curlimages/curl. The image is operator-spiffe-bootstrap (Python) and the bootstrap logic lives in setup_operator_client.py, which uses the requests library — no jq involved.
| app.kubernetes.io/component: operator-bootstrap | ||
| spec: | ||
| restartPolicy: OnFailure | ||
| serviceAccountName: default |
There was a problem hiding this comment.
must-fix serviceAccountName: default gives the Job the default SA in the keycloak namespace. The bootstrap script reads the keycloak-initial-admin Secret and makes Keycloak admin API calls — neither is permitted by the out-of-the-box default SA. Add a dedicated ServiceAccount + Role (granting get on secrets in the keycloak namespace) + RoleBinding, or at minimum document the required pre-existing RBAC.
There was a problem hiding this comment.
The Job already uses serviceAccountName: kagenti-operator-client-bootstrap with a dedicated ServiceAccount, Role (granting get on keycloak-initial-admin), and RoleBinding — all in the same template file, before the Job spec.
| "$KEYCLOAK_URL/admin/realms/$KEYCLOAK_REALM/identity-provider/instances/$SPIFFE_IDP_ALIAS") | ||
| IDP_HTTP_CODE=$(echo "$IDP_RESPONSE" | tail -n1) | ||
|
|
||
| if [ "$IDP_HTTP_CODE" = "404" ]; then |
There was a problem hiding this comment.
suggestion Only 404 is treated as "not found"; a 401, 403, or 5xx response silently falls through to the else branch and prints "already exists", then continues with a token or config that is actually broken. Consider adding: elif [ "$IDP_HTTP_CODE" != "200" ]; then echo "ERROR: unexpected HTTP $IDP_HTTP_CODE checking IdP"; exit 1; fi.
There was a problem hiding this comment.
The Python script handles this at line 167: elif response.status_code != 404: logger.error(...) followed by raise. 401/403/5xx all propagate as exceptions and fail the Job.
| oidcDiscoveryURL: "http://spire-spiffe-oidc-discovery-provider.zero-trust-workload-identity-manager.svc:8080" | ||
|
|
||
| # Trust domain (used for SPIFFE IDs) | ||
| spireTrustDomain: localtest.me |
There was a problem hiding this comment.
suggestion spireTrustDomain: localtest.me is a new top-level key, but kagenti-operator-chart.signatureVerification.spireTrustDomain already exists for the same trust domain. Users setting one won't know to set the other. Consider pointing the Job template's OPERATOR_CLIENT_ID default at .Values.kagentiOperator.spiffeAuth.operatorClientID (already a settable value) or reusing kagenti-operator-chart.signatureVerification.spireTrustDomain via a Helm template helper to avoid two sources of truth.
There was a problem hiding this comment.
Valid long-term cleanup — noted. Not blocking this PR. A follow-up should consolidate SPIFFE_TRUST_DOMAIN to derive from kagenti-operator-chart.signatureVerification.spireTrustDomain.
|
Thanks for the thorough review! Quick clarification: this PR is intended to be docs-only (the new The branch needs a force-push to trim it to the single doc commit. Once that's done the four Helm issues won't apply here. I'll track them against #2153 where the bootstrap Job actually lives. |
f5ccc35 to
c139dab
Compare
|
Rebased onto main. Responding to review comments: must-fix 1 (curlimages/curl + jq): The bootstrap Job does not use must-fix 2 (serviceAccountName: default): The Job already uses suggestion (HTTP error handling): Already handled in the Python script as noted above. suggestion (duplicate spireTrustDomain): Valid long-term cleanup. Filed as a separate concern — the Added a link to |
clawgenti
left a comment
There was a problem hiding this comment.
Docs-only PR adding a well-structured sidecar-injection.md reference page with cross-references from the README and deployment guide. One suggestion in the deployment guide edit.
- suggestion
deployment-guide.mdlines 45–54: the replacement text drops the canonical guidance that was in the removed note. The old callout told readers "All workloads should use an AgentRuntime CR" and namedAgentRuntime.Spec.AuthBridgeModeas the canonical method. The new text only shows the deprecated annotation example, so readers who never seesidecar-injection.mdlose the recommendation to migrate to the CR. Consider keeping one sentence pointing to the canonical path, e.g. "For workloads with an AgentRuntime CR, useAgentRuntime.Spec.AuthBridgeModeinstead — the annotation is retained only for workloads without a CR."
Reviewed by clawgenti using github:pr-review
| > The deprecated `kagenti.io/authbridge-mode` annotation is still honored | ||
| > but `AgentRuntime.Spec.AuthBridgeMode` is the canonical method. | ||
| The deprecated annotation is retained for tools and other workloads that | ||
| don't have their own AgentRuntime CR yet: |
There was a problem hiding this comment.
suggestion: The replacement text drops the canonical-method guidance from the removed note. The deleted callout told readers that AgentRuntime.Spec.AuthBridgeMode is the canonical path; this replacement only shows the deprecated annotation. Readers who land here without reading sidecar-injection.md will see no pointer to the preferred approach. Consider one bridging sentence, e.g.: "For workloads that have an AgentRuntime CR, set AgentRuntime.Spec.AuthBridgeMode instead — the annotation is retained only for workloads that do not yet have a CR."
There was a problem hiding this comment.
Fixed in 601d8c5 — the 'Selecting a mode' section in deployment-guide.md now shows the correct 3-layer chain with the namespace ConfigMap as canonical, and includes a note clarifying that AgentRuntime.Spec.AuthBridgeMode is not read by the mutating webhook.
clawgenti
left a comment
There was a problem hiding this comment.
Docs-only PR adding sidecar-injection.md with solid coverage of container expectations, label vocabulary, mode-switching, and feature gates.
Findings:
-
sidecar-injection.mdline 57 (kagenti.io/spiffe-helper-injectdescription): Says "preventing the bundled spiffe-helper process from starting" — but lines 27–35 of the same file explicitly state "There is no spiffe-helper container or process" and describe SPIRE as in-process via the go-spiffe SDK. The label description contradicts the callout on the same page. Suggest aligning: e.g. "Suppress SPIRE integration — setsSPIRE_ENABLED=falseon the sidecar, preventing the go-spiffe workload API source from being opened." -
deployment-guide.md(existing header, unchanged in this PR): The opening section still saysspiffe-helper is bundled inside every combined image and runs only when the operator sets SPIRE_ENABLED=true— inconsistent with the correction made in the final commit. Consider a follow-up to aligndeployment-guide.md's description with the new canonical wording insidecar-injection.md. -
PR title nit:
📖 Docs(authbridge): ...tripsverify-pr-title; the verifier expects a bare prefix likeDocs:orDocs(authbridge):without a leading emoji.
Reviewed by clawgenti using github:pr-review
| | Label | Default | Set to `false` to… | | ||
| |---|---|---| | ||
| | `kagenti.io/envoy-proxy-inject` | inject (when feature gate is on) | Disable the `envoy-proxy` sidecar (envoy-sidecar mode only) | | ||
| | `kagenti.io/spiffe-helper-inject` | inject (enabled) | Suppress SPIRE — sets `SPIRE_ENABLED=false` on the combined sidecar, preventing the bundled spiffe-helper process from starting | |
There was a problem hiding this comment.
Inconsistency with lines 27–35: This description says "preventing the bundled spiffe-helper process from starting," but the callout earlier in this file explicitly states "There is no spiffe-helper container or process" — AuthBridge uses the go-spiffe SDK directly. Suggest: "Suppress SPIRE integration — sets SPIRE_ENABLED=false on the sidecar, preventing the go-spiffe workload API source from being opened."
There was a problem hiding this comment.
Fixed in the prior commit — 'preventing the bundled spiffe-helper process from starting' → 'preventing the go-spiffe workload API source from being opened'.
| > platform. The operator applies `kagenti.io/type` labels automatically. | ||
| > The deprecated `kagenti.io/authbridge-mode` annotation is still honored | ||
| > but `AgentRuntime.Spec.AuthBridgeMode` is the canonical method. | ||
| The deprecated annotation is retained for tools and other workloads that |
There was a problem hiding this comment.
Nit / follow-up: The removed > **Note:** block contained canonical guidance ("All workloads should use an AgentRuntime CR") that is now only in sidecar-injection.md. That's fine for coverage, but note that the existing opening section of deployment-guide.md (unchanged in this PR) still describes spiffe-helper as a bundled binary that runs in-pod — inconsistent with the correction in the final commit. Worth a follow-up patch to deployment-guide.md's header to align with the new wording.
There was a problem hiding this comment.
Fixed in 601d8c5 — deployment-guide.md header now reads: 'SPIRE integration is built into every combined image using the go-spiffe SDK… there is no separate spiffe-helper binary or process.'
mrsabath
left a comment
There was a problem hiding this comment.
Genuinely useful, well-structured reference page — the container-by-mode table, label vocabulary, and the ASCII decision tree fill a real gap (#1775), and the large majority of the technical claims check out against kagenti-operator source (all feature-gate names & defaults, every label string incl. the exact kagenti.io/spiffe-helper-inject, the opt-out semantics of kagenti.io/inject=disabled, the four mode values, SPIRE_ENABLED, the proxy-init container name, the ConfigMap/mode key/default in the resolution chain, and the feature_gates.go link — the doubled kagenti-operator/kagenti-operator path segment is actually correct, the repo has a nested subdir). Link Check CI passed too.
Three factual errors need fixing before merge, because this page is meant to be authoritative and an operator will act on it (inline comments below):
- Mode-precedence chain lists a 4th "canonical"
AgentRuntime.Spec.AuthBridgeModelayer that the injection webhook never consults — it's a 3-layer chain. - Feature-gates ConfigMap is misnamed (
kagenti-webhook-config→kagenti-feature-gates). proxy-initis described as privileged when it's explicitly not.
Separately: the required verify-pr-title check is failing. The leading 📖 emoji pushes the Docs prefix off position 0, which the org ruleset rejects (allowed_prefixes must appear at the very start). Rename the PR title to Docs(authbridge): add sidecar injection reference page (drop the emoji) and it'll pass — the emoji is fine in the commit subject, just not the PR title.
Areas reviewed: Docs (accuracy vs kagenti-operator source, links), commit & PR conventions, CI
Commits: 4, all signed-off (DCO passed)
CI: verify-pr-title failing (emoji prefix); all other checks green
Thanks for writing this up, @Alan-Cha — it's a page the project needed. The fixes are all small string/precedence corrections.
|
Addressed all comments in 18dbfb3. Summary: must-fix (proxy-init privileged): Corrected — proxy-init runs as root (UID 0) with NET_ADMIN/NET_RAW only; must-fix (mode precedence — AgentRuntime not in injection chain): Corrected. The mutating webhook resolves mode from 3 layers only: namespace ConfigMap → deprecated annotation → cluster default. must-fix (feature gates ConfigMap name): Corrected — inconsistency (spiffe-helper process): Corrected — "preventing the bundled spiffe-helper process from starting" → "preventing the go-spiffe workload API source from being opened". nit (deployment-guide.md header): Corrected — replaced "spiffe-helper is bundled inside every combined image" with accurate go-spiffe SDK description. suggestion (deployment-guide.md deprecated annotation): The replacement sentence now points to the namespace ConfigMap as the canonical replacement, not AgentRuntime CR (since AuthBridgeMode doesn't affect injection). older must-fix comments (curlimages/curl, serviceAccountName: default, HTTP error handling): These remain addressed as noted in the prior comment — the bootstrap image is a Python script ( |
Documents the label vocabulary, per-mode container expectations, feature gates, and mode-switching precedence chain. Resolves #1775. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Alan Cha <[email protected]>
…ed-jwt Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Alan Cha <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Alan Cha <[email protected]>
…DK, not spiffe-helper process AuthBridge uses workloadapi.JWTSource from the go-spiffe SDK directly. The /opt SVID files are written by a goroutine inside AuthBridge itself, not by a separate spiffe-helper binary or process. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Alan Cha <[email protected]>
…t-guide sidecar-injection.md: - proxy-init is not privileged — runs as root (UID 0) with NET_ADMIN/NET_RAW only - kagenti.io/spiffe-helper-inject description: go-spiffe workload API source, not a spiffe-helper process - Mode resolution chain: remove AgentRuntime.Spec.AuthBridgeMode — the mutating webhook does not read this field; actual chain is 3 layers (namespace CM → annotation → default). Add note clarifying the field is validated but not wired. - Feature gates ConfigMap: kagenti-feature-gates, not kagenti-webhook-config - Decision flow diagram and label table: remove spiffe-helper process references deployment-guide.md: - Header: replace spiffe-helper bundled binary description with go-spiffe SDK - Deprecated annotation section: point to namespace ConfigMap as the replacement, not AgentRuntime CR (which does not affect injection mode) Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Alan Cha <[email protected]>
18dbfb3 to
abcc444
Compare
clawgenti
left a comment
There was a problem hiding this comment.
Documentation-only PR adding a well-structured sidecar injection reference page with clear label vocabulary, container tables, and decision flow. Two internal contradictions in the new/updated content need to be addressed before merge.
Reviewed by clawgenti using github:pr-review
| namespace `authbridge-runtime-config` ConfigMap instead — it is the canonical | ||
| way to set mode and applies to all workloads in the namespace: | ||
|
|
||
| ```yaml |
There was a problem hiding this comment.
suggestion: The prose says to use the namespace authbridge-runtime-config ConfigMap as the canonical replacement for the deprecated annotation, but the YAML example immediately below (lines 51–57) demonstrates the annotation (kagenti.io/authbridge-mode) — the thing being deprecated. The example should instead show the ConfigMap (kind: ConfigMap, name: authbridge-runtime-config, data.mode: envoy-sidecar) to match the guidance in the prose.
There was a problem hiding this comment.
Fixed in 71603f4 — the YAML example now shows the ConfigMap shape (data.config.yaml) matching the prose.
|
|
||
| | Annotation | Status | Replacement | | ||
| |---|---|---| | ||
| | `kagenti.io/authbridge-mode` | **Deprecated** — still honored | Use `AgentRuntime.Spec.AuthBridgeMode` | |
There was a problem hiding this comment.
suggestion: The deprecated label table lists AgentRuntime.Spec.AuthBridgeMode as the replacement for kagenti.io/authbridge-mode, but the "How to switch modes" section below (the note at lines 92–95) explicitly clarifies that AgentRuntime.Spec.AuthBridgeMode is not read by the mutating webhook and does not affect injection. The replacement column should point to the namespace authbridge-runtime-config ConfigMap instead, consistent with the mode-resolution chain described in this same document.
There was a problem hiding this comment.
Fixed — the deprecated annotation table now reads: 'Set mode: in the namespace authbridge-runtime-config ConfigMap'.
mrsabath
left a comment
There was a problem hiding this comment.
Summary
This is an unusually well-researched reference page — I verified the technical claims against the kagenti-operator webhook source and nearly all of them are correct:
- Container names —
authbridge-proxy,envoy-proxy,proxy-init✅ (injector/constants.go,injector/container_builder.go) - Modes —
proxy-sidecar(default),lite,envoy-sidecar,waypoint, incl. thelite= "auth-only, same shape" note ✅ (constants.go) - Feature gates —
globalEnabled/envoyProxy/injectTools/perWorkloadConfigResolutionnames + defaults (true/true/false/false) ✅ (config/feature_gates.go), including the literal-vs-valueFrombehavior - Pre-filter + per-sidecar labels —
kagenti.io/type,kagenti.io/inject=disabled,kagenti.io/envoy-proxy-inject,kagenti.io/spiffe-helper-inject, opt-out semantics ✅ (pod_mutator.go,precedence.go) - SPIRE narrative — in-process go-spiffe, socket
/spiffe-workload-api/spire-agent.sock,/opt/*.pemwritten by the combined image ✅ (container_builder.go) feature_gates.golink path ✅ resolves
Two things would mislead a reader who follows the page verbatim, so requesting changes:
- ConfigMap example is inert — the "Namespace default" example sets
mode:as a directdatakey, but the webhook only readsdata["config.yaml"]and parsesmode:from inside that YAML string (injector/namespace_config.goExtractMode). As written the example changes nothing. - Self-contradiction on the deprecated annotation — the "Deprecated label" table gives the replacement as
AgentRuntime.Spec.AuthBridgeMode, but this same page (andconstants.go) state the webhook does not read that field. The canonical replacement is the namespace ConfigMap — which is also what the siblingdeployment-guide.mdedit in this PR correctly says.
Details inline. One optional suggestion about the kagenti.io/spire label too.
Areas reviewed: Docs (accuracy vs kagenti-operator source, cross-file consistency), Commit/PR conventions
Commits: 5 commits, all signed-off (DCO passes)
CI status: all green (Link Check, Markdown Lint incl.)
Verdict: REQUEST_CHANGES — 2 must-fix; the rest of the page is accurate and can stay.
| # Keep injection but disable SPIRE | ||
| metadata: | ||
| labels: | ||
| kagenti.io/spiffe-helper-inject: "false" |
There was a problem hiding this comment.
suggestion (completeness): the operator also recognizes kagenti.io/spire=disabled as a SPIRE opt-out, separate from kagenti.io/spiffe-helper-inject (see pod_mutator.go SpireEnableLabel/SpireDisabledValue). Since this section is about disabling SPIRE, worth a line noting both labels so operators aren't surprised that either one suppresses it. Not blocking.
There was a problem hiding this comment.
I checked the source: SpireEnableLabel = "kagenti.io/spire" and SpireDisabledValue = "disabled" are defined as constants in pod_mutator.go but are never referenced in any evaluation path — not in precedence.go or anywhere else in the webhook. Setting this label has no effect. Left out of the docs to avoid misleading operators; if it should be wired in, that is a separate implementation task.
…el replacement sidecar-injection.md: - ConfigMap must use data.config.yaml key, not data.mode — the webhook reads cm.Data["config.yaml"] and calls ExtractMode on the YAML content inside - Deprecated annotation table: replacement is namespace ConfigMap, not AgentRuntime.Spec.AuthBridgeMode (which is not read by the mutating webhook) deployment-guide.md: - Replace deprecated annotation YAML example with a correct ConfigMap example, matching the prose that already points to the ConfigMap as the replacement Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Alan Cha <[email protected]>
|
Fixed in 71603f4. must-fix (ConfigMap shape): Corrected — the webhook reads data:
config.yaml: |
mode: proxy-sidecarmust-fix (deprecated annotation replacement): Corrected — both the deprecated label table in sidecar-injection.md and the YAML example in deployment-guide.md now point to the namespace ConfigMap, not suggestion (deployment-guide.md annotation YAML): Fixed — replaced the annotation example with a ConfigMap example to match the prose. suggestion (kagenti.io/spire=disabled): I checked the source — |
clawgenti
left a comment
There was a problem hiding this comment.
Documentation is clear and well-structured, covering container shapes, label vocabulary, feature gates, and the injection decision flow.
Finding: The "Selecting a mode" section in deployment-guide.md (line 28) still lists AgentRuntime.Spec.AuthBridgeMode as item #1 / canonical in the precedence chain, but the new text added by this PR (lines 47–49) declares the namespace ConfigMap as canonical, and sidecar-injection.md (lines 92–95) explicitly states that AgentRuntime.Spec.AuthBridgeMode is not read by the webhook and does not affect injection. The "Selecting a mode" section in deployment-guide.md was not updated to match, leaving the guide self-contradictory.
Reviewed by clawgenti using github:pr-review
| > platform. The operator applies `kagenti.io/type` labels automatically. | ||
| > The deprecated `kagenti.io/authbridge-mode` annotation is still honored | ||
| > but `AgentRuntime.Spec.AuthBridgeMode` is the canonical method. | ||
| The deprecated annotation is retained for backward compatibility. Use the |
There was a problem hiding this comment.
The text immediately above (the "Selecting a mode" precedence chain, line 28) still lists AgentRuntime.Spec.AuthBridgeMode as item #1 / canonical, but this new paragraph declares the namespace ConfigMap canonical instead. sidecar-injection.md (lines 92–95 added by this PR) clarifies that AgentRuntime does not affect injection at all. The "Selecting a mode" list in this file was not updated — consider removing or demoting the AgentRuntime entry (or adding a note matching sidecar-injection.md) to avoid the contradiction.
There was a problem hiding this comment.
Fixed in 601d8c5 — the 'Selecting a mode' section now shows the correct 3-layer chain (namespace ConfigMap canonical, deprecated annotation, cluster default) and the AgentRuntime YAML example has been removed.
Alan-Cha
left a comment
There was a problem hiding this comment.
The PR adds a new reference page (sidecar-injection.md) for AuthBridge injection behaviour, corrects two inaccuracies in deployment-guide.md (SPIRE is go-spiffe in-process, not a separate binary; the namespace ConfigMap is canonical for mode, not AgentRuntime.Spec.AuthBridgeMode), and updates cross-references in README.md. The corrections are improvements — the old docs were misleading on both counts. The new page is well-structured and technically precise.
Author: Alan-Cha (MEMBER — maintainer)
Areas reviewed: Docs
Agent/IDE config (.claude/.vscode): none
Commits: 6 commits, all signed-off ✅
CI status: all 22 checks passing ✅
(Cannot self-approve — posting as COMMENT. Verdict would be APPROVE.)
| ### Proxy Not Injected | ||
|
|
||
| 1. Verify the workload has an AgentRuntime CR targeting it (the operator applies the `kagenti.io/type` label automatically) | ||
| 1. Verify the pod has `kagenti.io/type: agent` label |
There was a problem hiding this comment.
Suggestion: This is more direct than the old step, but a reader unfamiliar with the platform may wonder how kagenti.io/type: agent gets set. The causal link (AgentRuntime reconciler) exists in sidecar-injection.md but isn't visible here.
Consider:
1. Verify the pod has `kagenti.io/type: agent` label — the operator sets this when an AgentRuntime CR targets the workload
There was a problem hiding this comment.
Fixed in 601d8c5 — step 1 now reads: 'Verify the pod has kagenti.io/type: agent label — the operator sets this automatically when an AgentRuntime CR targets the workload'.
| | Mode | Regular containers | Init containers | Notes | | ||
| |---|---|---|---| | ||
| | `proxy-sidecar` (default) | `<agent>` `authbridge-proxy` | — | SPIRE integration is in-process inside `authbridge-proxy` when `SPIRE_ENABLED=true` | | ||
| | `lite` | `<agent>` `authbridge-proxy` | — | Same shape as proxy-sidecar; uses `authbridge-lite` image (auth-only) | |
There was a problem hiding this comment.
Nit: The proxy-sidecar and envoy-sidecar rows both note SPIRE integration in-process, but the lite row is silent on SPIRE. The callout below says "every combined image" — does authbridge-lite count as a combined image?
- If yes (SPIRE in-process when
SPIRE_ENABLED=true), add a note matching the other rows. - If no (auth-only with no SPIRE support), make that explicit — e.g. "No SPIRE integration" — so readers don't have to infer it.
There was a problem hiding this comment.
authbridge-lite is the same binary as authbridge-proxy, just built with a reduced plugin set (jwt-validation + token-exchange, no protocol parsers). The go-spiffe SPIRE integration is present and enabled when SPIRE_ENABLED=true. Fixed the table row to note this explicitly.
…hint deployment-guide.md: - Selecting a mode: fix 4-layer chain to match actual 3-layer webhook logic; remove AgentRuntime CR YAML example (field not read by mutating webhook); add note explaining AgentRuntime.Spec.AuthBridgeMode is validated but not wired - Proxy Not Injected: note that kagenti.io/type is set by the operator when an AgentRuntime CR targets the workload sidecar-injection.md: - lite row: authbridge-lite is the same binary so SPIRE is in-process when SPIRE_ENABLED=true — note this explicitly Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Alan Cha <[email protected]>
clawgenti
left a comment
There was a problem hiding this comment.
Documentation-only PR adding sidecar-injection.md and correcting deployment-guide.md. All previously-requested changes have been addressed: the ConfigMap example now correctly uses data.config.yaml, the mode-resolution chain is the correct 3-layer form with the namespace ConfigMap as canonical, and the kagenti.io/spiffe-helper-inject description is consistent with the go-spiffe in-process narrative.
All checks pass. Ready for human review.
Reviewed by clawgenti using github:pr-review
clawgenti
left a comment
There was a problem hiding this comment.
Documentation-only PR adding sidecar-injection.md and correcting deployment-guide.md. All previously-requested changes have been addressed: the ConfigMap example correctly uses data.config.yaml, the mode-resolution chain is the correct 3-layer form with the namespace ConfigMap as canonical, the kagenti.io/spiffe-helper-inject description is consistent with the go-spiffe in-process narrative, and all 22 CI checks pass.
All checks pass. Ready for human review.
Reviewed by clawgenti using github:pr-review
mrsabath
left a comment
There was a problem hiding this comment.
Re-review — all must-fixes resolved ✅
Re-reviewed at 601d8c5. The two blocking issues from my last round are fixed correctly, and the earlier round's must-fixes remain correct — verified against kagenti-operator source:
- ✅ ConfigMap example now uses
data.config.yaml: | mode: …— matches how the webhook actually reads it (injector/namespace_config.goreadscm.Data["config.yaml"], thenExtractModeparses the top-levelmode:). - ✅ Deprecated-annotation replacement now points at the namespace
authbridge-runtime-configConfigMap instead of the injection-ignoredAgentRuntime.Spec.AuthBridgeMode. No longer self-contradictory. - ✅ Bonus: you generalized the fix to
deployment-guide.md— its mode chain now correctly reads ConfigMap → annotation → default with a note that the mutating webhook doesn't read the CR field. That file's old "AgentRuntime CR (canonical)" step 1 was a latent version of the same bug; good catch. - ✅ Still correct from the earlier round:
kagenti-feature-gatesConfigMap name, and theproxy-init"runs as root (UID 0) with NET_ADMIN/NET_RAW — not privileged" wording. - ✅
literow now notes in-process SPIRE parity with the other modes.
The rest of the page remains accurate against the operator webhook source (container names, all four modes, feature-gate names/defaults, label vocabulary, SPIRE socket path). Nicely researched reference page.
My earlier kagenti.io/spire completeness note was non-blocking — leaving it to your discretion.
Areas reviewed: Docs (accuracy vs kagenti-operator source, cross-file consistency), Commit/PR conventions
Commits: 7 commits, all signed-off (DCO passes)
CI status: all green
Verdict: APPROVE
Summary
docs/authbridge/sidecar-injection.md— a new user-facing reference page covering the AuthBridge injection modeldocs/authbridge/README.mdanddocs/authbridge/deployment-guide.mdCloses #1775
What's in the new page
kubectl get pods -o jsonpathto list container names in running podsproxy-sidecar,lite,envoy-sidecar,waypoint) to expected containers, with a callout that spiffe-helper is a bundled process (not a separate container)kagenti.io/authbridge-modeannotation, each with YAML examplesglobalEnabled,envoyProxy,injectTools,perWorkloadConfigResolutionwith defaults and link to sourceTest plan
docs/authbridge/sidecar-injection.mdrenders correctly on GitHubREADME.mdanddeployment-guide.mdresolve correctlyAssisted-By: Claude Code