kubernetes.manifest.diff ​
Server-side dry-run a manifest to preview what would change (no mutation)
Server-side dry-run a manifest to preview what would change (no mutation).
Sends the manifest to the Kubernetes API server with dryRun=All using the server-side apply PATCH path (Content-Type: application/apply-patch+yaml). The API server runs all defaulting and admission webhooks but does not persist the change. The response body is what the resource would look like after apply.
The workflow then GETs the current live state and diffs top-level fields (excluding metadata and status which the server always rewrites).
Inputs:
- connection_uuid: Cloud connection UUID for the target cluster (required).
- manifest: Single resource manifest dict with at minimum
apiVersion,kind,metadata.name.metadata.namespaceis required for namespaced resources.
Outputs:
- would_create: True if the resource does not yet exist on the cluster.
- would_update: True if the resource exists and the dry-run patch would change at least one top-level field outside metadata/status.
- patch_preview: The full resource body the API server projected (what the resource would look like after apply).
- changed_fields: List of top-level field paths that differ between the current live state and the projected state. Empty when
would_createis True.
Plugin required: context.get_plugin("connection").kubernetes_runner_clients(connection_uuid, organization_uuid) must expose api_client (a kubernetes.client.ApiClient instance).
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-kubernetes |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | Yes | — | Cloud connection UUID for the target cluster |
manifest | json | Yes | — | Single resource manifest with apiVersion, kind, metadata.name, and optionally metadata.namespace |
organization_uuid | uuid | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | No | — | — |
organization_uuid | uuid | No | — | — |
manifest | json | No | — | — |
would_create | boolean | No | — | True if the resource does not currently exist |
would_update | boolean | No | — | True if the resource exists and the patch would change it |
patch_preview | json | No | — | The projected resource body after apply (dry-run response) |
changed_fields | json | No | — | List of top-level field paths that differ |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
failed_layer | string | No | — | — |
failed_step | 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 ​
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "kubernetes.manifest.diff",
"initial_data": {
"connection_uuid": "value",
"manifest": "value"
}
}