kubernetes.clusterrole.delete ​
Delete a ClusterRole (cluster-scoped, rbac.authorization.k8s.io/v1)
Deletes a ClusterRole (cluster-scoped). Swallows 404 so the workflow is idempotent.
Deleting a ClusterRole does not delete the ClusterRoleBindings or RoleBindings that reference it; those bindings are left dangling and stop granting permissions. Pair this with kubernetes.clusterrolebinding.delete when tearing down a full grant.
Inputs:
- connection_uuid: Cloud connection UUID (required)
- name: ClusterRole name (required, cluster-scoped — no namespace)
Outputs:
- connection_uuid, name, existed: bool
Plugin required: context.get_plugin("connection").kubernetes_runner_clients(connection_uuid, organization_uuid) must expose rbac_authorization_v1 (a RbacAuthorizationV1Api instance) with delete_cluster_role.
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 ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "kubernetes.clusterrole.delete",
"initial_data": {
"connection_uuid": "value",
"name": "value"
}
}