krabka-operator

September 13, 2026 · View on GitHub

The Kubernetes operator for krabka: a Kafka cluster, its node pools, listeners, topics, users, connectors, schema registry and gRPC gateway, reconciled from custom resources.

Custom resources

All in group krabka.io, version v1alpha1:

KindWhat it declares
KafkaA cluster: brokers, controllers, storage, tuning, authorization
KafkaNodePoolA pool of nodes with its own roles and resources
KafkaTopicA topic and its configuration
KafkaUserA principal, its ACLs, and its credentials
KafkaListenerAn advertised listener and its authentication
KafkaConnectorA Connect connector
KafkaRebalanceA partition-reassignment plan
KafkaSchemaRegistryA schema registry deployment
KafkaGrpcGatewayA gRPC gateway deployment
KafkaClusterCaThe cluster CA and its renewal policy
KafkaLogging, KafkaMetrics, KafkaNetworkPolicyCross-cutting policy

The manifests live in charts/krabka-operator/crds, one krabka.io_<plural>.yaml per kind. Regenerate them from the Rust types with:

tools/regen-crds.sh

CI runs the same script and fails when the working tree changes, so a change to a CRD type has to reach the manifests in the same commit.

Chart

charts/krabka-operator installs the operator, its RBAC, and the CRDs. Helm creates the files in crds/ on install. It does not touch them on upgrade, so a schema change needs a kubectl apply of that directory.

Scope

This operator reconciles Kafka. Gres — the Postgres-compatible layer — is not here: its controllers reached about 21k lines of storage engine across gres-substrate, pgexec, pgkv and gres-ranges, none of which have been extracted, and it is under active development. It returns once those crates land in the organisation.

The chart does not install the Gres and GresTenant CRDs. They come back, from the generator, with the Gres controllers.

Layering

Depends on three sibling repositories, pinned by revision in Cargo.toml's [patch.crates-io]:

RepositoryWhat it supplies
krabka-protocolWire types, security, metadata, units
krabka-client-rsThe admin, core and producer clients
krabka-brokerObject store, kraft-core, logfmt

Build

cargo test --workspace
bazel test //...

Both are supported and both are gated in CI. Cargo stays the dependency source of truth; Bazel reads the same Cargo.toml and Cargo.lock.