Skip to content
Proud to collaborate with Microsoft for Startups

kubernetes.deployment.patch ​

Apply a strategic-merge, JSON-merge, or JSON patch to a Deployment

Applies a strategic-merge, JSON-merge, or JSON patch to an existing Deployment. The patch_type argument selects the Content-Type header sent to the Kubernetes API, so all three Kubernetes patch strategies are supported:

  • strategic (default) — strategic-merge patch; patch must be a dict.
  • merge — RFC 7396 JSON Merge Patch; patch must be a dict.
  • json — RFC 6902 JSON Patch; patch must be a list of operation objects.

The workflow temporarily overrides the Content-Type header on the api_client instance supplied by the connection plugin; the original value is always restored in a finally block.

Inputs:

  • connection_uuid: Cloud connection UUID (required)
  • namespace: Target namespace (required)
  • name: Deployment name (required)
  • patch: Patch body — dict for strategic/merge, list for json (required)
  • patch_type: One of "strategic" | "merge" | "json"; default "strategic" (optional)

Outputs:

  • connection_uuid, namespace, name, patch, patch_type
  • generation: Deployment generation after patch (integer or null)
  • observed_generation: Last observed generation from status (integer or null)

Plugin required: context.get_plugin("connection").kubernetes_runner_clients(connection_uuid, organization_uuid) must expose apps_v1 (AppsV1Api) with patch_namespaced_deployment and api_client with set_default_header.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-kubernetes
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
connection_uuidstringYes——
namespacestringYes——
namestringYes——
patchjsonYes——
patch_typestringNo——
organization_uuiduuidNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
connection_uuidstringNo——
organization_uuiduuidNo——
namespacestringNo——
namestringNo——
patchjsonNo——
patch_typestringNo——
generationintegerNo——
observed_generationintegerNo——
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": "kubernetes.deployment.patch",
  "initial_data": {
    "connection_uuid": "value",
    "namespace": "value",
    "name": "value",
    "patch": "value"
  }
}