k8s.app.teardown ​
Tear down a containerised app: Ingress/HPA/PDB + Service + Deployment + ConfigMap + Secret; PVCs only when delete_pvcs=true
Tear down a single-container app from a Kubernetes cluster.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Dag |
| Library | App-kubernetes |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | Yes | — | CloudConnection UUID for the target Kubernetes cluster, picked from the organization's kubernetes-type connections. |
namespace | string | Yes | — | Namespace the app lives in |
name | string | Yes | — | App name (same value passed to k8s.app.deploy) |
volume_claims | json | No | — | Same volume_claims list used at deploy. Required with delete_pvcs to name the PVCs. |
delete_pvcs | boolean | No | — | If true, delete PVCs named from volume_claims. Default false — data-preserving. |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connection_uuid | uuid | No | — | CloudConnection UUID for the target cluster, echoed from input. |
namespace | string | No | — | — |
name | string | No | — | — |
volume_claims | json | No | — | — |
delete_pvcs | boolean | No | — | — |
workflow_run_uuid | string | No | — | Engine-stamped DAG run id written by action_start. |
delete_ingress | json | No | — | — |
delete_hpa | json | No | — | — |
delete_pdb | json | No | — | — |
delete_service | json | No | — | — |
delete_deployment | json | No | — | — |
delete_configmap | json | No | — | — |
delete_secret | json | No | — | — |
delete_pvc_0 | json | No | — | — |
delete_pvc_1 | json | No | — | — |
delete_pvc_2 | json | No | — | — |
delete_pvc_3 | json | No | — | — |
delete_pvc_4 | json | No | — | — |
delete_pvc_5 | json | No | — | — |
delete_pvc_6 | json | No | — | — |
delete_pvc_7 | json | 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 | — | — |
DAG Layers ​
| # | Layer | Steps | Compensation |
|---|---|---|---|
| 1 | policy | kubernetes.ingress.delete, kubernetes.horizontalpodautoscaler.delete, kubernetes.poddisruptionbudget.delete | — |
| 2 | expose | kubernetes.service.delete | — |
| 3 | workload | kubernetes.deployment.delete | — |
| 4 | config | kubernetes.configmap.delete, kubernetes.secret.delete, kubernetes.pvc.delete, kubernetes.pvc.delete, kubernetes.pvc.delete, kubernetes.pvc.delete, kubernetes.pvc.delete, kubernetes.pvc.delete, kubernetes.pvc.delete, kubernetes.pvc.delete | — |
Execution Flow ​
Sub-workflows ​
| Sub-workflow | Step name |
|---|---|
kubernetes.ingress.delete | delete_ingress |
kubernetes.horizontalpodautoscaler.delete | delete_hpa |
kubernetes.poddisruptionbudget.delete | delete_pdb |
kubernetes.service.delete | delete_service |
kubernetes.deployment.delete | delete_deployment |
kubernetes.configmap.delete | delete_configmap |
kubernetes.secret.delete | delete_secret |
kubernetes.pvc.delete | delete_pvc_0 |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "k8s.app.teardown",
"initial_data": {
"connection_uuid": "value",
"namespace": "value",
"name": "value"
}
}