No description
  • Go 88.5%
  • Just 9%
  • Dockerfile 2.5%
Find a file
Artjom Meijer c141c10e2a Add RabbitMQ Fundament plugin
Installs the RabbitMQ Cluster Operator (v2.23.3) and Messaging Topology
Operator (v1.20.6) so project members can create brokers, vhosts, queues
and users in their own namespaces.

RabbitMQ publishes no official Helm chart for its operators, so the
upstream release manifests are vendored in manifests/, embedded with
go:embed and server-side applied. Reconcile re-applies them to repair
drift. Uninstall refuses while RabbitmqClusters exist and keeps the CRDs.
cert-manager is required for the operators' webhook certificates; without
it the plugin reports Degraded and retries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 15:04:00 +01:00
manifests Add RabbitMQ Fundament plugin 2026-11-24 15:04:00 +01:00
.dockerignore Add RabbitMQ Fundament plugin 2026-11-24 15:04:00 +01:00
.gitignore Add RabbitMQ Fundament plugin 2026-11-24 15:04:00 +01:00
definition.yaml Add RabbitMQ Fundament plugin 2026-11-24 15:04:00 +01:00
definition_test.go Add RabbitMQ Fundament plugin 2026-11-24 15:04:00 +01:00
Dockerfile Add RabbitMQ Fundament plugin 2026-11-24 15:04:00 +01:00
go.mod Add RabbitMQ Fundament plugin 2026-11-24 15:04:00 +01:00
go.sum Add RabbitMQ Fundament plugin 2026-11-24 15:04:00 +01:00
Justfile Add RabbitMQ Fundament plugin 2026-11-24 15:04:00 +01:00
LICENSE Add RabbitMQ Fundament plugin 2026-11-24 15:04:00 +01:00
main.go Add RabbitMQ Fundament plugin 2026-11-24 15:04:00 +01:00
mise.toml Add RabbitMQ Fundament plugin 2026-11-24 15:04:00 +01:00
operators.go Add RabbitMQ Fundament plugin 2026-11-24 15:04:00 +01:00
operators_test.go Add RabbitMQ Fundament plugin 2026-11-24 15:04:00 +01:00
plugin.go Add RabbitMQ Fundament plugin 2026-11-24 15:04:00 +01:00
plugin_test.go Add RabbitMQ Fundament plugin 2026-11-24 15:04:00 +01:00
README.md Add RabbitMQ Fundament plugin 2026-11-24 15:04:00 +01:00
test-resources.yaml Add RabbitMQ Fundament plugin 2026-11-24 15:04:00 +01:00

RabbitMQ

A Fundament plugin that gives projects RabbitMQ message brokers. It installs the RabbitMQ Cluster Operator (RabbitmqCluster) and the Messaging Topology Operator (Vhost, Queue, Exchange, Binding, User, Permission, Policy, …). Project members then create brokers and topology in their own namespaces from the console or with kubectl.

Requirements

  • The cert-manager plugin. Both operators get the serving certificates for their admission webhooks from cert-manager. Without it the plugin stays Degraded with a message saying so, and retries every 30 seconds.
  • A default StorageClass, e.g. Ceph BlockStorage with default: true. Every broker gets a PersistentVolumeClaim.

How it works

RabbitMQ publishes no official Helm chart for its operators (only Bitnami does), so unlike most Fundament plugins this one does not use Helm. The upstream release manifests are vendored unchanged in manifests/ and embedded in the binary with go:embed:

File Upstream version
manifests/cluster-operator.yml cluster-operator v2.23.3
manifests/messaging-topology-operator-with-certmanager.yaml messaging-topology-operator v1.20.6
manifests/fundament-roles.yaml the plugin's own: aggregates RabbitMQ access into the built-in admin, edit and view roles
  • Start server-side applies every object (field manager fundament-rabbitmq), in dependency order, on every start of the pod. A new plugin version therefore upgrades the operators.
  • Reconcile (every FUNP_RECONCILE_INTERVAL, default 5m) applies them again, which puts back anything deleted or edited, and reports the operators' readiness and how many brokers are ready.
  • Uninstall refuses while any RabbitmqCluster exists. Otherwise it deletes everything it applied except the CRDs: deleting a CRD deletes every object of that kind on the cluster.

The plugin runs no controller of its own, so brokers keep running while the plugin pod is down.

Layout

Path What it is
definition.yaml Plugin manifest: metadata, RBAC, console menu, status badges
plugin.go Start, Reconcile, Uninstall and the status summary
operators.go Loading, ordering, applying and deleting the embedded manifests
manifests/ Vendored upstream manifests and the plugin's aggregated roles
test-resources.yaml A sample broker, vhost and queue
Justfile Build, test, image and sandbox recipes

Develop

mise install          # Go, just, skaffold, kubectl at the pinned versions
go mod tidy
just test             # unit tests: manifests parse, apply order, RBAC coverage
just docker           # linux/amd64 image rabbitmq-plugin:dev

Without Go installed locally, the tests also run in a container:

docker run --rm -v "$PWD":/src -w /src golang:1.27.4-alpine go test ./...

In the sandbox

With the plugin sandbox from testing plugins locally running, and cert-manager installed in it:

functl plugin dev            # install with hot reload
just test-cluster            # broker + vhost + queue, waits until ready
just test-cluster-cleanup

Upgrading the operators

Change cluster_operator_version / topology_operator_version in the Justfile, run just vendor-manifests, review the diff, update the table above and bump metadata.version in definition.yaml.

Using it

apiVersion: rabbitmq.com/v1beta1
kind: RabbitmqCluster
metadata:
  name: broker
  namespace: <your-namespace>   # create namespaces in the Fundament console
spec:
  replicas: 1

The operator writes the default user's credentials to the Secret <name>-default-user (keys username, password, host, port, connection_string) and creates the Service <name> for AMQP (5672) and the management UI (15672). See the operator docs and the topology operator docs.

Publish

just docker v0.1.0
docker tag rabbitmq-plugin:v0.1.0 code.digitaledienst.overheid.nl/svb/rabbitmq-plugin:v0.1.0
docker push code.digitaledienst.overheid.nl/svb/rabbitmq-plugin:v0.1.0
docker buildx imagetools inspect code.digitaledienst.overheid.nl/svb/rabbitmq-plugin:v0.1.0   # digest
functl plugin publish definition.yaml --create --submit \
  --image=code.digitaledienst.overheid.nl/svb/rabbitmq-plugin@sha256:<digest>

Each version is published once; bump metadata.version for a new one.

Licence

The plugin is Apache-2.0. The vendored manifests are the RabbitMQ operators' own, under MPL-2.0.