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;patchmust be a dict.merge— RFC 7396 JSON Merge Patch;patchmust be a dict.json— RFC 6902 JSON Patch;patchmust 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 ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-kubernetes |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | string | Yes | — | — |
namespace | string | Yes | — | — |
name | string | Yes | — | — |
patch | json | Yes | — | — |
patch_type | string | No | — | — |
organization_uuid | uuid | No | — | — |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | string | No | — | — |
organization_uuid | uuid | No | — | — |
namespace | string | No | — | — |
name | string | No | — | — |
patch | json | No | — | — |
patch_type | string | No | — | — |
generation | integer | No | — | — |
observed_generation | integer | 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 | — | 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 ​
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"
}
}