kubernetes.statefulset.wait_for_ready ​
Poll a StatefulSet until all replicas are ready or timeout
Poll a StatefulSet until all replicas are ready, or until the timeout is reached.
The workflow enters a WAITING state and re-polls on a configurable interval using schedule_transition. It exits to COMPLETED when::
status.ready_replicas == spec.replicas AND status.updated_replicas == spec.replicas
It exits to FAILED (with StatefulSetReadyTimeoutError) when the cumulative wait exceeds timeout_seconds.
Inputs:
- connection_uuid: UUID of the cloud connection (required)
- namespace: Kubernetes namespace (required)
- name: StatefulSet name (required)
- timeout_seconds: Maximum total wait in seconds (optional, default 300, cap 1800)
- poll_interval: Seconds between polls (optional, default 5, cap 60)
Outputs:
- ready: bool — True when the StatefulSet became ready
- poll_count: int — Number of polls executed
- last_observed_status: JSON — Status snapshot from the last poll
Plugin required: context.get_plugin("connection").kubernetes_runner_clients(connection_uuid, organization_uuid) must expose apps_v1 with read_namespaced_stateful_set_status.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-kubernetes |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | Yes | — | — |
namespace | string | Yes | — | — |
name | string | Yes | — | — |
timeout_seconds | integer | No | — | — |
poll_interval | integer | No | — | — |
organization_uuid | uuid | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | No | — | — |
organization_uuid | uuid | No | — | — |
namespace | string | No | — | — |
name | string | No | — | — |
timeout_seconds | integer | No | — | — |
poll_interval | integer | No | — | — |
ready | boolean | No | — | — |
poll_count | integer | No | — | — |
last_observed_status | json | 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 | — | start_polling | — |
waiting | No | No | — | — | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | start_polling | waiting | — |
waiting | poll | waiting | — |
waiting | complete | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "kubernetes.statefulset.wait_for_ready",
"initial_data": {
"connection_uuid": "value",
"namespace": "value",
"name": "value"
}
}