Skip to content

Agent import with Workload Type 'Deployment' fails: 403 from agent-label-protection policy, no workload created #2489

Closed

Description

@mrsabath

Summary

When importing an agent via the Rossoctl UI and selecting Workload Type: Deployment (instead of the default Sandbox), the Shipwright source build succeeds but no workload and no AgentRuntime are created. The agent silently never deploys.

Root cause

The backend's finalize_shipwright_build (rossoctl/backend/app/routers/agents.py:4652) attempts to create a Deployment with the rossoctl.io/type label already set. This is rejected by a ValidatingAdmissionPolicy:

deployments.apps "weather-service-advanced" is forbidden:
ValidatingAdmissionPolicy 'agent-label-protection' with binding 'agent-label-protection' denied request:
The rossoctl.io/type label on team1/weather-service-advanced can only be applied by the
rossoctl-operator via an AgentRuntime CR. Create an AgentRuntime targeting this workload
instead of manually setting the label.
code: 403

So the Deployment code path sets a label that only the operator (via an AgentRuntime CR) is allowed to set. The Sandbox path goes through the operator and works correctly.

Impact

  • The build completes (and re-triggers), consuming resources, but the user gets no pod, no AgentRuntime, and no error surfaced in the UI.
  • Following any doc that says 'Workload Type: Deployment' (e.g. the weather-agent demos) leads straight into this.

Repro

  1. Import an agent via the UI (build from source).
  2. Set Workload Type to Deployment (override the Sandbox default).
  3. Deploy. Observe the build pod completes but no agentruntime/pod for the agent appears.
  4. Backend logs show the 403 above.

Expected

Either: the backend should create the agent via an AgentRuntime CR (not a raw labeled Deployment) for the Deployment workload type too; or the UI should not offer 'Deployment' for agents if it cannot work; or the failure should surface clearly in the UI.

Environment

  • Kind on macOS, operator v0.7.0.
  • Found while running authbridge/demos/weather-agent/demo-ui-advanced.md.

Assisted-By: Claude (Anthropic AI) [email protected]

Activity

  1. added a commit that references this issue on Sep 1, 2026
  2. added a commit that references this issue on Sep 1, 2026
    7150b09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions