Skip to content
Proud to collaborate with Microsoft for Startups

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 ​

PropertyValue
Workflow typeLinear
LibraryApp-kubernetes
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
connection_uuiduuidYes——
namespacestringYes——
namestringYes——
timeout_secondsintegerNo——
poll_intervalintegerNo——
organization_uuiduuidNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
connection_uuiduuidNo——
organization_uuiduuidNo——
namespacestringNo——
namestringNo——
timeout_secondsintegerNo——
poll_intervalintegerNo——
readybooleanNo——
poll_countintegerNo——
last_observed_statusjsonNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—start_polling—
waitingNoNo———
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingstart_pollingwaiting—
waitingpollwaiting—
waitingcompletecompleted—
* (any state)failfailed—

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"
  }
}