Ansible provisions the k3d cluster and Flux controllers; Terraform modules deploy the simulated fleet and ground warehouse. Compose and k3d share var/t1 (live lake) and var/t3 (warehouse). The prototype gains a live mode fed by the explorer read-only SQL API.
67 lines
1.6 KiB
Terraform
67 lines
1.6 KiB
Terraform
variable "kubeconfig" {
|
|
description = "Path to the kubeconfig for the simulation cluster"
|
|
type = string
|
|
default = "~/.kube/config"
|
|
}
|
|
|
|
variable "kube_context" {
|
|
description = "Kubeconfig context of the k3d simulation cluster"
|
|
type = string
|
|
default = "k3d-swarm-sim"
|
|
}
|
|
|
|
variable "namespace" {
|
|
description = "Namespace for the simulated fleet"
|
|
type = string
|
|
default = "swarm"
|
|
}
|
|
|
|
variable "simulator_image" {
|
|
description = "Simulator image (imported into k3d by infra/ansible/sim-cluster.yml)"
|
|
type = string
|
|
default = "swarm-house/simulator:dev"
|
|
}
|
|
|
|
variable "drone_count" {
|
|
description = "Number of virtual drones in the fleet"
|
|
type = number
|
|
default = 5
|
|
|
|
validation {
|
|
condition = var.drone_count >= 1 && var.drone_count <= 32
|
|
error_message = "drone_count must be between 1 and 32."
|
|
}
|
|
}
|
|
|
|
variable "flight_duration_s" {
|
|
description = "Simulated flight length in seconds; each pod restart begins a new flight"
|
|
type = number
|
|
default = 300
|
|
}
|
|
|
|
variable "speedup" {
|
|
description = "Wall-clock acceleration of the simulation"
|
|
type = number
|
|
default = 2
|
|
}
|
|
|
|
variable "data_host_path" {
|
|
description = "Host path inside the k3d node mounted as the shared Parquet lake"
|
|
type = string
|
|
default = "/data"
|
|
}
|
|
|
|
variable "node_ports" {
|
|
description = "Host-reachable NodePorts (must match the ports opened by sim-cluster.yml)"
|
|
type = object({
|
|
explorer = number
|
|
grafana = number
|
|
prometheus = number
|
|
})
|
|
default = {
|
|
explorer = 30088
|
|
grafana = 30300
|
|
prometheus = 30990
|
|
}
|
|
}
|