Skip to content
This repository was archived by the owner on Nov 12, 2026. It is now read-only.

📖 Add migration plan for AgentCard controller to support Deployments/StatefulSets - #169

Merged
pdettori merged 2 commits into
rossoctl:mainfrom
pdettori:issue-163
Feb 2, 2026
Merged

pdettori merged 2 commits into
rossoctl:mainfrom
pdettori:issue-163

Conversation

@pdettori

@pdettori pdettori commented Feb 1, 2026 •

Copy link
Copy Markdown
Member

Summary

This PR adds a migration plan for updating the AgentCard controller to work with standard Kubernetes workloads (Deployments and StatefulSets) instead of the custom Agent CRD.

Key Changes

  • Introduces targetRef field using duck typing pattern (similar to Gateway API) for explicit workload references
  • Replaces ambiguous label-based selector with direct apiVersion/kind/name reference
  • Uses unstructured.Unstructured to support any workload type without code changes

Example

  spec:
    targetRef:
      apiVersion: apps/v1
      kind: Deployment
      name: my-agent

Why targetRef?

  • Explicit: References exactly one workload by name
  • Extensible: Supports any workload type (Deployment, StatefulSet, Job) without code changes
  • Follows K8s conventions: Aligns with Gateway API's PolicyTargetReference pattern

Backward Compatibility

  • Deprecated selector field remains supported
  • Existing AgentCards are automatically migrated to use targetRef
  • Legacy Agent CRD support via --enable-legacy-agent-crd flag

This aligns with the Kagenti UI migration where agents are deployed directly as Deployments/StatefulSets rather than through the Agent CRD.

Related issue(s)

Fixes #163

🤖 Assisted by Claude Code

Signed-off-by: Paolo Dettori <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>

@cwiklik cwiklik left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm

@pdettori
pdettori merged commit ebdfce3 into rossoctl:main Feb 2, 2026
3 checks passed
@pdettori
pdettori deleted the issue-163 branch February 2, 2026 18:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Design plan to refactor AgentCard controller to work with Deployments and StatefulSets

2 participants