Skip to content

Docs: update demos to use AgentRuntime to enroll agents/tools instead of manual labeling#494

Merged
pdettori merged 1 commit into
rossoctl:mainfrom
rh-dnagornuks:remove-manual-labeling
Jun 23, 2026
Merged

Docs: update demos to use AgentRuntime to enroll agents/tools instead of manual labeling#494
pdettori merged 1 commit into
rossoctl:mainfrom
rh-dnagornuks:remove-manual-labeling

Conversation

@rh-dnagornuks

@rh-dnagornuks rh-dnagornuks commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Many demos deploy agents and tools with a kagenti.io/type label manually applied instead of using AgentRuntime CR to enroll the workload and inject sidecars. AgentRuntime will become mandatory to enroll workloads and manually labeling will become impossible once rossoctl/operator#418 merged as Validating Admission Policy will only allow the controller (via AgentRuntime) and UI backend (as a temporary measure, but eventually the UI backend should use AgentRuntime to create workloads) to apply the label.

Changes

  • Echo, Finance-Sparc, Ibac, Weather agent deployments – remove labels in workload deployment's and pod's metadata
  • Git Issue and mTLS agent deployments – remove labels and add AgentRuntime manifests for enrollment
  • mTLS makefile - add a step to wait for labels to be applied to the workload
  • Update comments and demo docs

Testing

The following demos are able to be completed without any issues:

  • Weather Agent
  • Weather Agent Advanced
  • GitHub Issue Agent (Manual)
  • mTLS
  • echo
  • finance-sparc
  • ibac

Summary by CodeRabbit

Release Notes

  • New Features

    • Demos now use AgentRuntime custom resources for workload enrollment instead of manual labeling.
  • Chores

    • Updated demo Kubernetes manifests to reflect new enrollment pattern.
    • Added automated operator label verification to deployment process.
    • Updated demo documentation and comments to describe AgentRuntime-based enrollment.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Across all AuthBridge demo manifests, the kagenti.io/type: agent label is removed from Deployment Pod template metadata. New AgentRuntime CRs are introduced for mtls-caller, mtls-callee, and git-issue-agent to trigger operator enrollment. The mTLS Makefile gains a polling target waiting for the operator to apply labels, and inline comments and documentation are updated to reflect the new enrollment mechanism.

Changes

AgentRuntime Enrollment Migration

Layer / File(s) Summary
New AgentRuntime CR additions
authbridge/demos/mtls/k8s/caller.yaml, authbridge/demos/mtls/k8s/callee.yaml, authbridge/demos/github-issue/k8s/git-issue-agent-deployment.yaml
Appends AgentRuntime CRs (agent.kagenti.dev/v1alpha1) for mtls-caller, mtls-callee, and git-issue-agent, each with spec.type: agent and a targetRef pointing to the respective Deployment, replacing the direct Pod-label enrollment trigger.
Pod template label removals across all demos
authbridge/demos/mtls/k8s/caller.yaml, authbridge/demos/mtls/k8s/callee.yaml, authbridge/demos/github-issue/k8s/git-issue-agent-deployment.yaml, authbridge/demos/echo/k8s/agent.yaml, authbridge/demos/finance-sparc/k8s/agent.yaml, authbridge/demos/ibac/k8s/agent.yaml, authbridge/demos/weather-agent/k8s/weather-tool-advanced.yaml, authbridge/demos/weather-agent/k8s/weather-service-advanced.yaml
Removes kagenti.io/type: agent from all Deployment Pod template label blocks; weather-service-advanced additionally replaces it with protocol.kagenti.io/a2a: ""; injection labels (kagenti.io/inject, kagenti.io/spire) remain unchanged.
Manifest comment and docs alignment
authbridge/demos/echo/k8s/agent.yaml, authbridge/demos/finance-sparc/k8s/agent.yaml, authbridge/demos/ibac/k8s/agent.yaml, authbridge/demos/github-issue/k8s/git-issue-agent-deployment.yaml, authbridge/demos/github-issue/k8s/github-tool-deployment.yaml, authbridge/demos/weather-agent/k8s/weather-tool-advanced.yaml
Updates inline comments to state that kagenti.io/type is operator-applied via AgentRuntime, removes references to the label from UI-discovery descriptions, and updates collision/webhook explanations to reference AgentRuntime CRs.
mTLS Makefile wait target and README update
authbridge/demos/mtls/Makefile, authbridge/demos/mtls/README.md
Adds wait-operator-labels Make target polling kubectl for kagenti.io/type=agent on caller and callee Deployments (~120 s timeout); deploy and demo-mtls-permissive targets invoke it after manifest apply. README updated to describe label application via AgentRuntime enrollment.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • kagenti/kagenti-extensions#440: Directly opposing change — added kagenti.io/type: agent to the same mTLS demo caller.yaml and callee.yaml Pod template labels that this PR removes, making it the predecessor whose pattern this PR replaces with AgentRuntime CRs.
  • kagenti/kagenti-extensions#441: Both PRs update authbridge/demos/mtls/README.md to reflect operator-managed labeling rather than explicit Pod-template labels.
  • kagenti/kagenti-extensions#466: Both PRs edit authbridge/demos/weather-agent/demo-ui-advanced.md to clarify AgentRuntime enrollment and update the kubectl-only appendix for applying AgentRuntime manifests.

Suggested reviewers

  • huang195

Poem

🐇 Hoppity-hop through the YAML land,
Labels removed by operator's hand.
AgentRuntime CRs now take the stage,
The webhook enrolls them, page by page.
No more manual type tags — hooray!
The operator labels them all today! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and accurately summarizes the main objective of the PR: updating demos to use AgentRuntime CR for agent/tool enrollment instead of manual labeling.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rh-dnagornuks

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
authbridge/demos/mtls/Makefile (1)

13-28: Use bracket notation for jsonpath keys with dots.

Lines 19 and 24 use escaped-dot syntax to access the kagenti.io/type label. While the escaped-dot form (kagenti\.io/type) is valid and functional in kubectl, Kubernetes best practices recommend using bracket notation with quotes (['kagenti.io/type']) for keys containing dots. This approach is more explicit, more reliable across kubectl versions, and is the officially recommended syntax.

Suggested changes
  jsonpath='{.spec.template.metadata.labels.kagenti\.io/type}'

to:

  jsonpath="{.spec.template.metadata.labels['kagenti.io/type']}"

Apply this change at both lines 19 and 24.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@authbridge/demos/mtls/Makefile` around lines 13 - 28, In the
wait-operator-labels target in the Makefile, the jsonpath expressions used in
the kubectl commands on lines 19 and 24 are using escaped-dot syntax
(kagenti\.io/type) to access the label key. Replace this with the officially
recommended bracket notation with quotes (['kagenti.io/type']) in both locations
where the jsonpath argument appears in the `-o
jsonpath='{.spec.template.metadata.labels.kagenti\.io/type}'` expressions. This
provides more explicit, reliable, and standard syntax for accessing keys
containing dots.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@authbridge/demos/mtls/Makefile`:
- Around line 13-28: In the wait-operator-labels target in the Makefile, the
jsonpath expressions used in the kubectl commands on lines 19 and 24 are using
escaped-dot syntax (kagenti\.io/type) to access the label key. Replace this with
the officially recommended bracket notation with quotes (['kagenti.io/type']) in
both locations where the jsonpath argument appears in the `-o
jsonpath='{.spec.template.metadata.labels.kagenti\.io/type}'` expressions. This
provides more explicit, reliable, and standard syntax for accessing keys
containing dots.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e95c495f-1c28-4437-9b41-d4998cd8019c

📥 Commits

Reviewing files that changed from the base of the PR and between 1cd2a12 and 730ec2f.

📒 Files selected for processing (12)
  • authbridge/demos/echo/k8s/agent.yaml
  • authbridge/demos/finance-sparc/k8s/agent.yaml
  • authbridge/demos/github-issue/k8s/git-issue-agent-deployment.yaml
  • authbridge/demos/github-issue/k8s/github-tool-deployment.yaml
  • authbridge/demos/ibac/k8s/agent.yaml
  • authbridge/demos/mtls/Makefile
  • authbridge/demos/mtls/README.md
  • authbridge/demos/mtls/k8s/callee.yaml
  • authbridge/demos/mtls/k8s/caller.yaml
  • authbridge/demos/weather-agent/demo-ui-advanced.md
  • authbridge/demos/weather-agent/k8s/weather-service-advanced.yaml
  • authbridge/demos/weather-agent/k8s/weather-tool-advanced.yaml
💤 Files with no reviewable changes (1)
  • authbridge/demos/weather-agent/k8s/weather-service-advanced.yaml

@rh-dnagornuks
rh-dnagornuks force-pushed the remove-manual-labeling branch 2 times, most recently from dc35a4e to dd21dc9 Compare June 16, 2026 11:14

@pdettori pdettori left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

This PR cleanly migrates the AuthBridge demos away from manually-applied kagenti.io/type: agent labels toward operator-applied labels via AgentRuntime CRs, ahead of the operator's Validating Admission Policy (kagenti-operator#418).

The inline-CR conversions are all correct — echo, finance-sparc, ibac, github-issue, and mtls caller/callee each have an AgentRuntime whose name / namespace: team1 / targetRef matches its Deployment, and the CR is appended to the same manifest file that gets applied, so a single kubectl apply -f <file> covers both. The mtls Makefile's new wait-operator-labels gate is a nice touch, and the github tool correctly keeps no CR (intentionally not injected).

One blocking gap: the weather-advanced demo's AgentRuntime CRs live in separate agentruntime-*.yaml files that the documented raw-manifest apply path never applies — so removing the inline labels breaks that path silently. Details inline.

Areas reviewed: K8s/YAML manifests, Makefile, Docs
Agent/IDE config (.claude/.vscode): none touched
Commits: 1, signed-off (DCO passing)
CI: all passing

Note: the PR's own testing checklist leaves both Weather boxes unchecked, consistent with the finding below.

Assisted-By: Claude Code

Comment thread authbridge/demos/weather-agent/demo-ui-advanced.md
@rh-dnagornuks
rh-dnagornuks force-pushed the remove-manual-labeling branch 2 times, most recently from 3cffaf1 to 13d7353 Compare June 17, 2026 09:40
… of manual labeling

Remove kagenti.io/type labels in deployment files and include AgentRuntime where necessary.
Add a step to mTLS makefile to wait for labels to apply to workload deployment.
Update documentation and comments to reflect the new behavior.

Signed-off-by: Daniels Nagornuks <dnagornu@redhat.com>
@rh-dnagornuks

Copy link
Copy Markdown
Contributor Author

@pdettori I applied the requested changes. Could you please re-review my PR when convenient?

@pdettori pdettori left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review

My earlier must-fix is fully addressed in d8176da:

  • The kubectl-only ("skip the UI") apply block now applies both agentruntime-weather-tool-advanced.yaml and agentruntime-weather-service-advanced.yaml, each before its rollout status wait — so the raw-manifest path now triggers operator labeling / sidecar injection instead of silently skipping it.
  • The misleading "deploy script applies AgentRuntime CRs too" inline comment has been removed.
  • Both referenced CR files exist at HEAD.

LGTM. Approving.

Assisted-By: Claude Code

@pdettori
pdettori merged commit f4a5a25 into rossoctl:main Jun 23, 2026
23 checks passed
@github-project-automation github-project-automation Bot moved this from New/ToDo to Done in Rossoctl Issue Prioritization Jun 23, 2026
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