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

AgentCardNetworkPolicy controller does not watch Sandbox workloads #341

Closed

Description

@cwiklik

Summary

The AgentCardNetworkPolicyReconciler watches Deployment and StatefulSet to create NetworkPolicies for workloads referenced by AgentCards. It does not watch Sandbox (agents.x-k8s.io/v1alpha1), so Sandbox-deployed agents don't get NetworkPolicies created.

Impact

Depending on the cluster's default network policy:

  • Default deny: Sandbox agents are unreachable — no ingress policy allows traffic to them
  • Default allow: Sandbox agents have no network segmentation — less secure than Deployment/StatefulSet agents

Required Changes

  1. Add a conditional Watches call in SetupWithManager using SandboxCRDExists() guard
  2. Use unstructured object with sandboxGVK
  3. Map Sandbox events to AgentCard via mapWorkloadToAgentCard("agents.x-k8s.io/v1alpha1", "Sandbox")
  4. Add RBAC marker for agents.x-k8s.io sandboxes

Reference

Acceptance Criteria

  • NetworkPolicy created for Sandbox workloads referenced by AgentCards
  • Existing Deployment/StatefulSet behavior unchanged
  • Controller does not crash when Sandbox CRD is not installed

Activity

  1. added
    enhancement
    on May 8, 2026
  2. self-assigned this
    on May 8, 2026
  3. added a commit that references this issue on May 11, 2026
    56bd08f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions