deploy.k8s.import-namespace ​
Adopt every Deployment in a Kubernetes namespace as a DeploymentTarget row, keyed by (cloud_connection, namespace, app_name).
Import all Deployments in a Kubernetes namespace as DeploymentTargets.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-deployments |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | Yes | — | — |
cloud_connection_uuid | uuid | Yes | — | UUID of the kubernetes-type CloudConnection |
namespace | string | Yes | — | Cluster namespace to discover (e.g. ltinteg-product) |
label_selector | string | No | — | Optional kubectl-style label selector |
default_product_type | string | No | — | DeploymentProductType for new rows (default 'service') |
default_target_type | string | No | — | DeploymentTargetType for new rows (default 'container_service') |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | uuid | No | — | — |
cloud_connection_uuid | uuid | No | — | — |
namespace | string | No | — | — |
label_selector | string | No | — | — |
default_product_type | string | No | — | — |
default_target_type | string | No | — | — |
imported_count | integer | No | — | — |
created_count | integer | No | — | — |
updated_count | integer | No | — | — |
targets | json | No | — | List of {uuid, namespace, app_name, status, image} per target touched |
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": "deploy.k8s.import-namespace",
"initial_data": {
"organization_uuid": "value",
"cloud_connection_uuid": "value",
"namespace": "value"
}
}