Skip to content
Proud to collaborate with Microsoft for Startups

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 ​

PropertyValue
Workflow typeAtomic
LibraryApp-kubernetes
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
connection_uuiduuidYes—CloudConnection UUID for the target cluster
manifestsjsonYes—List of resource manifest dicts to apply
namespacestringNo—Default namespace for namespaced manifests
owner_labelstringNo—key=value owner label (required for prune)
prunebooleanNo—Delete owned resources no longer desired
prune_kindsjsonNo—Extra apiVersion/Kind to scan for strays
field_managerstringNo—Server-side-apply field manager
forcebooleanNo—Force-reclaim drifted fields (self-heal)
waitbooleanNo—Wait for Deployment / StatefulSet / Job rollouts
timeout_secondsintegerNo——
poll_intervalintegerNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
connection_uuiduuidNo—CloudConnection UUID echoed from input.
manifestsjsonNo——
namespacestringNo——
owner_labelstringNo——
prunebooleanNo——
prune_kindsjsonNo——
field_managerstringNo——
forcebooleanNo——
waitbooleanNo——
timeout_secondsintegerNo——
poll_intervalintegerNo——
appliedjsonNo——
prunedjsonNo——
unhealthyjsonNo——
syncedbooleanNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "k8s.manifest.sync",
  "initial_data": {
    "connection_uuid": "value",
    "manifests": "value"
  }
}