Skip to content

feat: add Sandbox support to AgentCardSync controller - #343

Merged
cwiklik merged 1 commit into
mainfrom
feat/sandbox-agentcardsync
May 8, 2026
Merged

feat: add Sandbox support to AgentCardSync controller#343
cwiklik merged 1 commit into
mainfrom
feat/sandbox-agentcardsync

Conversation

@cwiklik

@cwiklik cwiklik commented May 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add ReconcileSandbox method using unstructured client to reconcile Sandbox workloads
  • Register a separate named controller (agentcardsync-sandbox) with SandboxCRDExists() guard
  • Add RBAC marker for agents.x-k8s.io sandboxes

This ensures AgentCards are auto-created for Sandbox workloads labelled with kagenti.io/type: agent, making agents discoverable via the A2A protocol.

Closes #339

Test plan

  • Deploy operator with Sandbox CRD installed → verify agentcardsync-sandbox controller registers
  • Create a Sandbox with kagenti.io/type: agent + protocol.kagenti.io/a2a: "true" → verify AgentCard <name>-sandbox-card is created
  • Deploy operator without Sandbox CRD → verify no error and controller is skipped

Assisted-By: Claude Code

The AgentCardSync controller auto-creates AgentCard CRs for workloads
with kagenti.io/type=agent and protocol labels. It only watched
Deployment and StatefulSet, missing Sandbox workloads entirely.

Add ReconcileSandbox method with sandboxReconcilerAdapter following
the existing per-kind adapter pattern. Conditionally register a third
controller (agentcardsync-sandbox) when the Sandbox CRD is installed.

Fixes: #339

Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: cwiklik <cwiklikj@gmail.com>

@mrsabath mrsabath left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Clean implementation following the existing per-kind adapter pattern. Uses SandboxCRDExists guard for conditional registration, unstructured client for the Sandbox GVK, and correctly checks labels via shouldSyncWorkload before creating AgentCards. RBAC is appropriately read-only.

Areas reviewed: Go (controller logic, adapter pattern, RBAC, manager setup)
CI: All 16 checks pass

@cwiklik
cwiklik merged commit b3130f2 into main May 8, 2026
16 checks passed
@pdettori
pdettori deleted the feat/sandbox-agentcardsync branch July 15, 2026 23:23
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.

AgentCardSync controller does not watch Sandbox workloads

3 participants