You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Agent import with Workload Type 'Deployment' fails: 403 from agent-label-protection policy, no workload created #2489
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
Import an agent via the UI (build from source).
Set Workload Type to Deployment (override the Sandbox default).
Deploy. Observe the build pod completes but no agentruntime/pod for the agent appears.
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.
Activity
fix(backend): add missing contexts field to FinalizeShipwrightBuildRe…
Merge pull request #2507 from rossoctl/fix/2489-deployment-label-403
fix(backend): don't stamp rossoctl.io/type on Shipwright-finalized wo…