kubernetes.persistentvolume.delete ​
Delete a cluster PersistentVolume (destructive; reclaims orphaned storage)
Deletes a cluster-scoped PersistentVolume. Swallows 404 so the workflow is idempotent — callers can safely delete one that was already removed.
This is the reclaim step for storage a teardown left behind: a Released volume under a Retain policy that no namespace will ever claim again. kubernetes.persistentvolume.list flags those as orphaned.
Destructive and unrecoverable. Under a Retain policy the PV object is the last cluster-side handle on the backing cloud disk, so deleting it both discards the data and, depending on the provisioner, may leave the disk itself allocated in the cloud account — check the provider console after a reclaim sweep rather than assuming the bill stopped.
A PV still Bound to a live PVC does not disappear on delete: Kubernetes marks it Terminating and its finalizer holds until the claim goes away. Delete the PVC first. This workflow reports what the API server accepted; it does not wait for the object to actually vanish.
Inputs:
- connection_uuid: Cloud connection UUID (required)
- name: PersistentVolume name (required)
Outputs:
- name, existed: bool existed=False means the PersistentVolume was already absent.
Plugin required: context.get_plugin("connection").kubernetes_runner_clients(connection_uuid, organization_uuid) must expose core_v1 with delete_persistent_volume.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-kubernetes |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | Yes | — | — |
name | string | Yes | — | — |
organization_uuid | uuid | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | No | — | — |
organization_uuid | uuid | No | — | — |
name | string | No | — | — |
existed | boolean | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "kubernetes.persistentvolume.delete",
"initial_data": {
"connection_uuid": "value",
"name": "value"
}
}