# GitOps — ground segment (Flux) Flux = long-lived ground config from git. Not on drones. Not fleet manifest. Different lifecycles ([11 — CI/CD](../../docs/11-cicd-delivery.md)). ## Boundary: Terraform vs Flux vs fleet manifest | Layer | Tool | Owns | | --- | --- | --- | | Cluster + first boot | **Terraform** ([`../terraform/`](../terraform/)) | Namespaces, PVCs, Deployments, CronJobs, NodePorts | | Ongoing ground config | **Flux** (this directory) | Policy labels, dashboard bundles, offload knobs | | Drones | **[Fleet release manifest](../../docs/11-cicd-delivery.md)** | Compose digests, model weights, peer registry — dock-only | Drones outside GitOps. No reconciler in flight. Dock applies pinned manifest once. No mid-mission drift — no update endpoint in radio profile. ## Layout ``` infra/gitops/ flux/ Flux GitRepository + Kustomization CRs (install into flux-system) ground/ Kustomize overlay reconciled into the ground namespace ``` ## Bootstrap on the k3d simulation cluster `infra/ansible/sim-cluster.yml` installs Flux and applies CRs. After first `git push`, Flux reconciles `infra/gitops/ground/`. ```bash # Manual bootstrap (if you skipped Ansible): flux install --namespace=flux-system kubectl apply -k infra/gitops/flux ``` Reconcile immediately: ```bash flux reconcile source git swarm-house -n flux-system flux reconcile kustomization ground-segment -n flux-system ``` ## What Flux manages [`ground/`](ground/) overlay: GitOps-managed ConfigMap with fleet policy metadata. Production extends to Grafana dashboards, Prometheus rules, offload-schedule ConfigMaps — git-versioned, no `terraform apply` for label tweaks.