k8s.manifest.sync ​
Reconcile a cluster to a desired manifest set (apply + prune + self-heal + wait)
Reconcile a Kubernetes cluster to a desired set of manifests (apply + prune + self-heal + wait). This is the generic GitOps reconcile primitive.
Inputs:
- connection_uuid: CloudConnection UUID for the target cluster (required).
- manifests: List of resource manifest dicts to apply (required).
- namespace: Default namespace for namespaced manifests that omit one (optional).
- owner_label: "key=value" stamped on every applied resource and used to scope prune to this owner (optional; required for prune).
- prune: Delete owned resources no longer in the set (default False).
- prune_kinds: Extra ["apiVersion/Kind", ...] to scan for strays beyond the kinds present in the desired set — pass kinds removed since the last sync so the last instance of a kind is still pruned (optional).
- field_manager: Server-side-apply field manager (default ltinteg-gitops).
- force: Force-reclaim drifted fields = self-heal (default True).
- wait: Wait for Deployment rollouts to become Available (default True).
- timeout_seconds / poll_interval: forwarded to the rollout wait.
Outputs:
- applied: [{api_version, kind, namespace, name, action}] (action=created|updated)
- pruned: [{api_version, kind, namespace, name}]
- unhealthy: [{kind, namespace, name, reason}] (empty when all healthy)
- synced: True when everything applied and (if waited) all healthy.
Plugin required: context.get_plugin("connection").kubernetes_runner_clients(connection_uuid, organization_uuid) exposing api_client.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-kubernetes |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | Yes | — | CloudConnection UUID for the target cluster |
manifests | json | Yes | — | List of resource manifest dicts to apply |
namespace | string | No | — | Default namespace for namespaced manifests |
owner_label | string | No | — | key=value owner label (required for prune) |
prune | boolean | No | — | Delete owned resources no longer desired |
prune_kinds | json | No | — | Extra apiVersion/Kind to scan for strays |
field_manager | string | No | — | Server-side-apply field manager |
force | boolean | No | — | Force-reclaim drifted fields (self-heal) |
wait | boolean | No | — | Wait for Deployment / StatefulSet / Job rollouts |
timeout_seconds | integer | No | — | — |
poll_interval | integer | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | No | — | CloudConnection UUID echoed from input. |
manifests | json | No | — | — |
namespace | string | No | — | — |
owner_label | string | No | — | — |
prune | boolean | No | — | — |
prune_kinds | json | No | — | — |
field_manager | string | No | — | — |
force | boolean | No | — | — |
wait | boolean | No | — | — |
timeout_seconds | integer | No | — | — |
poll_interval | integer | No | — | — |
applied | json | No | — | — |
pruned | json | No | — | — |
unhealthy | json | No | — | — |
synced | 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": "k8s.manifest.sync",
"initial_data": {
"connection_uuid": "value",
"manifests": "value"
}
}