Implementation:A5c ai Babysitter deployment plan validation
Appearance
| Knowledge Sources | |
|---|---|
| Domains | Kubernetes, Deployment_Planning |
| Last Updated | 2026-10-23 00:00 GMT |
Overview
Concrete tools for validating cloud configuration and building a deployment plan for Kradle Kubernetes environments.
Description
Two functions form the deployment planning stage:
- validateCloudConfig(config) — Validates the loaded CloudConfig, returning an object with ok, errors, and warnings arrays. Checks for required fields, valid target types, and consistency.
- buildDeploymentPlan(config) — Translates a validated CloudConfig into a DeploymentPlan with helm release name, namespace, target, terraform summary, and kubernetes manifests. This plan is consumed by the rendering and installation steps.
Usage
- Kradle deployment Step 2: After loading config, validate it and build the deployment plan before rendering manifests.
Code Reference
Source Location
- Repository: Babysitter
- File: packages/kradle/installer/src/cli.ts:L192-216 (handlePlan)
Signature
function validateCloudConfig(config: CloudConfig): {
ok: boolean;
errors: ValidationEntry[];
warnings: ValidationEntry[];
};
function buildDeploymentPlan(config: CloudConfig): DeploymentPlan;
// DeploymentPlan: { helm, namespace, target, terraform: { summary }, kubernetes: { manifests, summary } }
Import
import { validateCloudConfig, buildDeploymentPlan } from "@a5c-ai/kradle/installer";
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| config | CloudConfig | Yes | Loaded cloud config from Step 1 |
Outputs
| Name | Type | Description |
|---|---|---|
| Validation | { ok, errors, warnings } | Validation report |
| DeploymentPlan | object | Helm release name, namespace, target, terraform summary, kubernetes manifests |
Usage Examples
Validate and Plan
import { loadCloudConfig, validateCloudConfig, buildDeploymentPlan } from "@a5c-ai/kradle/installer";
const config = await loadCloudConfig({ environment: "staging" });
const validation = validateCloudConfig(config);
if (!validation.ok) {
console.error("Config errors:", validation.errors);
process.exit(1);
}
const plan = buildDeploymentPlan(config);
console.log("Helm release:", plan.helm.releaseName);
CLI Usage
# Validate and plan via CLI
kradle cloud plan --config cloud-config.json --output deployment-plan.json
Related Pages
Implements Principle
Requires Environment
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment