monedula-acl-rbac-converter
A CLI that converts Apache Kafka ACLs into Confluent RBAC role bindings through a checksummed plan and verifies effective access before any ACL is deleted.
monedula-gitops v1.0.0, AGPL-3.0
Describe topics, access, quotas, schemas, SCRAM users and Confluent RBAC as YAML in Git. monedula-gitops diffs it against the live cluster, applies only what changed, and fails CI when the cluster drifts. The same manifests run from a CLI or a Kubernetes operator.
brew install monedula-dev/tap/monedula-gitops go install github.com/monedula-dev/monedula-gitops/cmd/monedula-gitops@latest docker run --rm ghcr.io/monedula-dev/monedula-gitops:latest --help helm install monedula-gitops oci://ghcr.io/monedula-dev/charts/monedula-gitops apiVersion: gitops.monedula.dev/v1alpha1
kind: KafkaTopic
metadata:
name: orders
spec:
clusterRef: { name: prod }
topicName: orders
partitions: 6
config:
retention.ms: "604800000"
access:
producers:
- principal: User:svc-checkout
consumers:
- principal: User:svc-fraud
group: fraud-orders monedula-gitops diff -f ./manifests --cluster-config-file ./cluster.yaml# preview: the topic, plus the ACLs its access block compiles tomonedula-gitops apply -f ./manifests --cluster-config-file ./cluster.yamlmonedula-gitops verify -f ./manifests --cluster-config-file ./cluster.yaml# exit 0: no drift. exit 1: drift, and the CI job fails.
Kafka configuration rarely lives in one place.
Topics come from one script, ACLs from another, schemas from application pipelines, quotas from an administrator, and Confluent RBAC role bindings from yet another tool. Over time only the live cluster describes the system, and nobody has reviewed that description.
import clusterTurn a live cluster into manifests.
YAML + pull requestTopics, access, quotas, schemas, SCRAM users and role bindings as Kubernetes-style YAML.
diffdiff and apply --dry-run show the plan against the live cluster first.
applyOnly the needed operations run. Pruning and risky changes wait for explicit flags.
verifyverify exits 1 on drift, so a scheduled CI job catches out-of-band changes.
Most Kafka tooling keeps a topic in one place and its access in another. monedula-gitops attaches access to the topic itself: list the producers and consumers, and the matching topic and consumer-group ACLs are generated. On RBAC-backed clusters the same block can compile to Confluent MDS role bindings.
When you need prefixed patterns, shared consumer groups or host restrictions, standalone KafkaAccessPolicy and KafkaRoleBinding resources are there.
KafkaTopic + KafkaUserKafkaTopic with an access blockimport cluster reads topics, ACLs, quotas, schemas and, where supported, RBAC role bindings, and writes manifests. Verifying them against the same cluster reports no drift.
monedula-gitops import cluster --cluster-config-file ./clusters/prod.yaml --output-dir ./imported
monedula-gitops verify -f ./imported -R --cluster-config-file ./clusters/prod.yaml # exits 0: no drift A KafkaUser declares a SCRAM credential, so the topic, its access and the principal that uses it live in Git together. The CLI reads the password from an environment variable or a file; the operator reads it from a Kubernetes Secret, or generates one.
KafkaRoleBinding manages Confluent MDS role bindings alongside ACLs.
apiVersion: gitops.monedula.dev/v1alpha1
kind: KafkaUser
metadata:
name: svc-checkout
spec:
clusterRef: { name: prod }
password:
valueFrom: { env: SVC_CHECKOUT_PASSWORD } --dry-run previews every change. The CLI never deletes a topic, SCRAM user or quota that you remove from Git. --prune deletes only ACLs and role bindings that fall inside a grant your manifests still declare, and risky changes such as a partition increase, a lower schema compatibility or a removed quota limit wait for --allow-destructive. In Kubernetes, a topic's deletion policy decides whether deleting the resource also deletes the topic, and Delete also needs the allow-delete annotation.
| 0 | Success, or no drift for verify |
|---|---|
| 1 | Drift detected (verify) |
| 2 | Validation, configuration or connectivity error, or a failed operation |
| 3 | Only gated operations remain: they await --allow-destructive |
brew install monedula-dev/tap/monedula-gitops go install github.com/monedula-dev/monedula-gitops/cmd/monedula-gitops@latest docker run --rm ghcr.io/monedula-dev/monedula-gitops:latest --help helm install monedula-gitops oci://ghcr.io/monedula-dev/charts/monedula-gitops Prebuilt binaries for Linux and macOS are on the releases page. Next: get started with the CLI.
We can help you run monedula-gitops across a large estate, from design to day-to-day operations.
More free tools for Apache Kafka from the same team. About Flock
A CLI that converts Apache Kafka ACLs into Confluent RBAC role bindings through a checksummed plan and verifies effective access before any ACL is deleted.
A Kafka MetricsReporter plugin that ships broker, JVM and KIP-714 client metrics over OTLP; a collector outage never blocks Kafka.
A read-only Go CLI that turns a real Kafka cluster into a shareable Kafka Simulator link, with an MCP server for AI agents.
An interactive, deterministic Apache Kafka simulator in the browser: break a cluster, scrub the timeline and read why it reacted.