Overview
Concrete tool for loading and initializing Kradle cloud deployment configuration from JSON, YAML, or preset environments.
Description
The loadCloudConfig function (exposed via the Kradle installer CLI cloud init command) reads a cloud configuration from a file path or builds one from a preset environment name (minikube, staging, prod, custom). It supports --set key=value overrides for any configuration field. The resulting CloudConfig object carries environment, namespace, target, auth, ingress, agents, and execution settings.
Usage
- Kradle deployment Step 1: Initialize cloud configuration before planning, rendering, or installing.
Code Reference
Source Location
- Repository: Babysitter
- File: packages/kradle/installer/src/cli.ts:L129-136 (resolvedConfig helper), L177-190 (handleInit)
Signature
function loadCloudConfig(options: {
configPath?: string;
environment?: DeploymentEnvironment; // 'minikube' | 'staging' | 'prod' | 'custom'
set?: string[]; // key=value override pairs
}): Promise<CloudConfig>;
// CLI
kradle cloud init --config <path> --env <preset> --set key=value --output <file>
Import
import { loadCloudConfig } from "@a5c-ai/kradle/installer";
I/O Contract
Inputs
| Name |
Type |
Required |
Description
|
| configPath |
string |
No |
JSON or YAML config file path
|
| environment |
DeploymentEnvironment |
No |
Preset name (minikube, staging, prod, custom)
|
| set |
string[] |
No |
key=value override pairs
|
Outputs
| Name |
Type |
Description
|
| CloudConfig |
object |
Environment, namespace, target, auth, ingress, agents, execution settings
|
Usage Examples
Initialize from Preset
# Initialize with minikube preset
kradle cloud init --env minikube --output cloud-config.json
Initialize with Overrides
# Initialize staging with custom namespace and image
kradle cloud init --env staging --set namespace=my-ns --set image=my-registry/kradle:latest
Load from File
kradle cloud init --config ./my-config.json --output resolved-config.json
Related Pages
Implements Principle
Requires Environment
Page Connections
Double-click a node to navigate. Hold to expand connections.