Skip to main content

krabka-operator

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:

Kind What it declares
Kafka A cluster: brokers, controllers, storage, tuning, authorization
KafkaNodePool A pool of nodes with its own roles and resources
KafkaTopic A topic and its configuration
KafkaUser A principal, its ACLs, and its credentials
KafkaListener An advertised listener and its authentication
KafkaConnector A Connect connector
KafkaRebalance A partition-reassignment plan
KafkaSchemaRegistry A schema registry deployment
KafkaGrpcGateway A gRPC gateway deployment
KafkaClusterCa The cluster CA and its renewal policy
KafkaLogging, KafkaMetrics, KafkaNetworkPolicy Cross-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]:

Repository What it supplies
krabka-protocol Wire types, security, metadata, units
krabka-client-rs The admin, core and producer clients
krabka-broker Object 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.