Skip to content
Proud to collaborate with Microsoft for Startups

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.namespace is 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_create is True.

Plugin required: context.get_plugin("connection").kubernetes_runner_clients(connection_uuid, organization_uuid) must expose api_client (a kubernetes.client.ApiClient instance).

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-kubernetes
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
connection_uuiduuidYes—Cloud connection UUID for the target cluster
manifestjsonYes—Single resource manifest with apiVersion, kind, metadata.name, and optionally metadata.namespace
organization_uuiduuidNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
connection_uuiduuidNo——
organization_uuiduuidNo——
manifestjsonNo——
would_createbooleanNo—True if the resource does not currently exist
would_updatebooleanNo—True if the resource exists and the patch would change it
patch_previewjsonNo—The projected resource body after apply (dry-run response)
changed_fieldsjsonNo—List of top-level field paths that differ
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
errorstringNo——
error_typestringNo——
failed_layerstringNo——
failed_stepstringNo——

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": "kubernetes.manifest.diff",
  "initial_data": {
    "connection_uuid": "value",
    "manifest": "value"
  }
}