# Koof: Kubernetes OpenAPI Operator Framework

**URL:** <https://users.rust-lang.org/t/koof-kubernetes-openapi-operator-framework/143056>\
**Category:** code review\
**Created:** [October 15, 2026, 2:49pm UTC](https://users.rust-lang.org/t/koof-kubernetes-openapi-operator-framework/143056 "2026-10-15T14:49:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anasinnyk](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/anasinnyk/32/54316_2.png) [@anasinnyk](https://users.rust-lang.org/u/anasinnyk)\
**Post date:** [October 15, 2026, 2:49pm UTC](https://users.rust-lang.org/t/koof-kubernetes-openapi-operator-framework/143056/1 "2026-10-15T14:49:16Z")

</div>

Hi everyone! 👋

For my bootcamp project I built **koof** , a framework that generates Kubernetes operators from OpenAPI specs. You describe resources with a few `x-kube-*` extensions in OpenAPI Overlays, and it generates CRDs, controllers and end-to-end tests. As examples, there are two generated providers: **Cloudflare** and **Sentry**.

I'd really appreciate a review, even just ideas or first impressions. I'm also planning to use these providers at work, so maybe the project will be useful to someone else too.

**PR:** [Implementation by anasinnyk · Pull Request #1 · anasinnyk/koof · GitHub](https://github.com/anasinnyk/koof/pull/1)

# Project structure

- `crates/koof` — runtime library: Crossplane-style reconciliation, the provider HTTP client, config, metrics, manifest generation and a fake provider API for tests.
- `crates/koof-gen` — code generator: OpenAPI + overlays → provider crate (CRD types, descriptors, API operations) and Chainsaw e2e tests.
- `crates/providers/cloudflare` — Cloudflare provider: upstream OpenAPI spec + our overlays; the Rust code is almost entirely generated.
- `crates/providers/sentry` — Sentry provider; experimental, never run against the real service.
- `deploy` — Kustomize manifests (shared base + generated per-provider CRDs and RBAC).
- `scripts` — regenerate code, check generated files, run e2e tests on kind.

# What I'd love feedback on

- The overall idea and architecture: does generating operators from OpenAPI make sense, and what would you do differently?
- The overlay format (`x-kube-resource`, `x-kube-operation`): is it understandable?
- The reconciliation logic in `crates/koof/src/controller` (drift detection, late initialization, deletion).

# Where to start

1. An overlay, e.g. `crates/providers/cloudflare/openapi/cloudflare.dns-record.overlay.yaml`, and the matching example in `examples/`.
2. `crates/koof/src/resource.rs`: the contract between generated code and the runtime.
3. `crates/koof/src/controller/mod.rs`: the main reconcile loop.

Any comments are welcome: issues, PR comments, or just reply here. Thanks! 🙏
