Problem
Context resources can be attached to StatefulSet or Sandbox agents, but the
current API does not report consumers. DELETE accepts a context deletion while
an agent still mounts its PVC.
Kubernetes PVC protection prevents the underlying volume from being physically
removed while a running Pod mounts it, but this can leave the PVC in
Terminating after the API and CLI report that deletion was accepted. It also
does not explain which agent is blocking removal.
This gap was identified while reviewing rossoctl/rossoctl-cli#73.
Desired behavior
- Context
get and list responses expose whether the resource is in use and,
where practical, identify its consumers.
- Deleting an in-use context returns
409 Conflict by default with an actionable
explanation.
- Any force-delete behavior is explicit and is not the default.
- The contract distinguishes currently mounted Pods from desired references held
by Rosso agent resources, including scaled-down or temporarily stopped agents.
- rossoctl can display the usage information and require explicit intent before a
forced deletion.
Design question
Context Service can discover Pods that currently mount its PVC, while Rosso knows
which agent specifications reference a named context. Decide whether Context
Service owns the full dependency check or whether Rosso enriches and enforces the
user-facing lifecycle using both sources.
Acceptance criteria
- Active use is visible through the API.
- A normal delete cannot silently strand an in-use PVC in
Terminating.
- Tests cover mounted, unmounted, and already-absent resources.
- The Rosso and CLI documentation describes the implemented behavior.
Problem
Context resources can be attached to StatefulSet or Sandbox agents, but the
current API does not report consumers.
DELETEaccepts a context deletion whilean agent still mounts its PVC.
Kubernetes PVC protection prevents the underlying volume from being physically
removed while a running Pod mounts it, but this can leave the PVC in
Terminatingafter the API and CLI report that deletion was accepted. It alsodoes not explain which agent is blocking removal.
This gap was identified while reviewing rossoctl/rossoctl-cli#73.
Desired behavior
getandlistresponses expose whether the resource is in use and,where practical, identify its consumers.
409 Conflictby default with an actionableexplanation.
by Rosso agent resources, including scaled-down or temporarily stopped agents.
forced deletion.
Design question
Context Service can discover Pods that currently mount its PVC, while Rosso knows
which agent specifications reference a named context. Decide whether Context
Service owns the full dependency check or whether Rosso enriches and enforces the
user-facing lifecycle using both sources.
Acceptance criteria
Terminating.