Skip to content
Proud to collaborate with Microsoft for Startups

kubernetes.job.delete ​

Delete a Kubernetes Job

Deletes a Kubernetes Job. Swallows 404.

The propagation_policy argument controls how the Job's dependent objects (e.g. Pods) are cleaned up:

  • Background (default) — Job is deleted immediately; Pods are garbage-collected asynchronously. Orphans Pods unless the cluster garbage-collector catches up.
  • Foreground — Kubernetes waits for all dependent Pods to be deleted before removing the Job itself.
  • Orphan — Job is deleted; dependents are left running and are disowned.

On 404 the workflow still succeeds and returns existed: false.

Inputs:

  • connection_uuid: Cloud connection UUID (required)
  • namespace: Target namespace (required)
  • name: Job name (required)
  • propagation_policy: One of Foreground | Background | Orphan (optional; default Background)

Outputs:

  • connection_uuid, namespace, name, propagation_policy
  • existed: bool — False when the Job was already absent

Plugin required: context.get_plugin("connection").kubernetes_runner_clients(connection_uuid, organization_uuid) must expose batch_v1 (BatchV1Api) with delete_namespaced_job.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-kubernetes
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
connection_uuidstringYes——
namespacestringYes——
namestringYes——
propagation_policystringNo——
organization_uuiduuidNo——

Output Schema ​

FieldTypeRequiredDefaultDescription
connection_uuidstringNo——
organization_uuiduuidNo——
namespacestringNo——
namestringNo——
propagation_policystringNo——
existedbooleanNo——
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.job.delete",
  "initial_data": {
    "connection_uuid": "value",
    "namespace": "value",
    "name": "value"
  }
}