mirror of
https://github.com/hanzoai/operator.git
synced 2026-10-30 15:06:11 +00:00
Replace the kubebuilder-Go scaffold with a Rust kube-rs operator that serves as the canonical operator binary for every universe (Hanzo, Lux, Zoo, Osage, <tenant>). ## What changed - 20 CRD Kinds at `<api-group>/v1` (8 canonical + 9 unbranded facades + 3 v1alpha1 legacy compat aliases). - API group configurable at install via `--api-group` / `OPERATOR_API_GROUP` (default `hanzo.ai`). CRD YAMLs rendered with the new `generate-crd-yaml` binary do a string-rewrite for other universes (compile-time-group + install-time rebind trade-off documented in src/api_group.rs). - One binary spawns all 23 controllers behind lease-based leader election (lifted from former operator-core, now src/core/leader.rs). - Server-side apply throughout — managed objects revert out-of-band edits on next reconcile. - Pre-rendered CRD YAMLs for all universes under k8s/crds/. - Legacy Go implementation preserved on legacy/go-impl-before-rust-port branch. ## Critical invariant spec.env / spec.volumes / spec.volumeMounts MUST be honored on the generated Deployment. The gateway 503 root cause (May 2026) was the Go operator silently dropping these. Three unit tests in controllers/service.rs::tests assert the round-trip: cargo test --lib # 35 passed; 0 failed # env_is_carried_to_main_container ... ok # volume_mounts_are_carried_to_main_container ... ok # deployment_carries_volumes ... ok ## Verification cargo build --release # green cargo clippy --all-targets -- -D warnings # green cargo fmt --check # green cargo test --lib # 35 / 35 passing ## operator-core absorbed The standalone hanzoai/operator-core repo's modules (error, leader, iam_admin, secret, status, reconciler) are absorbed under src/core/ here. The operator-core README is now a tombstone pointer. Downstream consumers (a downstream operator, lux/operator, zoo/operator) will need a follow-up Cargo.toml update to depend on hanzoai/operator directly — out of scope for this commit. ## CI .github/workflows/publish.yml uses the shared hanzoai/.github/.github/workflows/docker-build.yml@main workflow with platforms: linux/amd64,linux/arm64. Tags v* publish ghcr.io/hanzoai/operator:vX.Y.Z. arm64 will fall back to QEMU on the amd64 runner if the ARC scale set is paused per universe LLM.md 2026-04-27. ## Out of scope - Not deployed to the cluster — old Go operator continues running until coordinated cutover. - Not touching universe/test/operator-e2e (owned by another agent).
7 lines
43 B
Plaintext
7 lines
43 B
Plaintext
target/
|
|
.git/
|
|
.github/
|
|
bin/
|
|
*.md
|
|
k8s/crds/
|