gitops.sync
Reconcile one GitOpsApplication (resolve → render → apply/diff → record)
Reconcile one GitOpsApplication: resolve its revision, read manifests from the repo, and apply them to the cluster (or report drift in preview mode).
Inputs:
- organization_uuid: calling org (required).
- application_uuid: the GitOpsApplication to reconcile (required).
- trigger: webhook | poll | manual (default manual). A webhook trigger whose SHA is unchanged short-circuits to skipped; poll always reconciles so it can self-heal drift.
Composes: data.gitops.application.get, github.refs.resolve, github.code.get_tree, github.code.get_blob, k8s.manifest.sync / k8s.manifest.diff_set, data.gitops.sync-run.record.
Overview
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-gitops |
| Version | 1.0 |
Input Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | — |
application_uuid | uuid | Yes | — | — |
trigger | string | No | — | webhook |
Output Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
application_uuid | uuid | No | — | — |
status | string | No | — | synced |
commit_sha | string | No | — | — |
resolved_ref | string | No | — | — |
manifest_count | integer | No | — | — |
result | json | No | — | — |
sync_run_uuid | uuid | 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 | — | reconcile | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram
Transitions
| From | Action | To | Description |
|---|---|---|---|
pending | reconcile | completed | — |
* (any state) | fail | failed | — |
API Usage
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "gitops.sync",
"initial_data": {
"organization_uuid": "value",
"application_uuid": "value"
}
}