rabbitmq-cluster-operator

by joaquinito2051

Helm chartv3.1.2App 2.0.0

The RabbitMQ Cluster Kubernetes Operator automates provisioning, management, and operations of RabbitMQ clusters running on Kubernetes.

About this chart

RabbitMQ Cluster Operator packaged by Bitnami

The RabbitMQ Cluster Kubernetes Operator automates provisioning, management, and operations of RabbitMQ clusters running on Kubernetes.

Overview of RabbitMQ Cluster Operator

Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.

Azure-ready Charts with Containers from marketplace.azurecr.io

This Helm Chart has been configured to pull the Container Images from the Azure Marketplace Public Repository. The following command allows you to download and install all the charts from this repository.

$ helm repo add bitnami-azure https://marketplace.azurecr.io/helm/v1/repo

TL;DR

$ helm repo add my-repo https://charts.bitnami.com/bitnami
$ helm install my-release my-repo/rabbitmq-cluster-operator

Introduction

Bitnami charts for Helm are carefully engineered, actively maintained and are the quickest and easiest way to deploy containers on a Kubernetes cluster that are ready to handle production workloads.

This chart bootstraps a RabbitMQ Cluster Operator Deployment in a Kubernetes cluster using the Helm package manager.

Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters.

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.2.0+
  • PV provisioner support in the underlying infrastructure

Installing the Chart

To install the chart with the release name my-release:

helm install my-release my-repo/rabbitmq-cluster-operators

The command deploy the RabbitMQ Cluster Kubernetes Operator on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the my-release deployment:

helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Differences between the Bitnami RabbitMQ chart and the Bitnami RabbitMQ Operator chart

In the Bitnami catalog we offer both the bitnami/rabbitmq and bitnami/rabbitmq-operator charts. Each solution covers different needs and use cases.

The bitnami/rabbitmq chart deploys a single RabbitMQ installation using a Kubernetes StatefulSet object (together with Services, PVCs, ConfigMaps, etc.). The figure below shows the deployed objects in the cluster after executing helm install:

                    +--------------+             +-----+
                    |              |             |     |
 Service            |   RabbitMQ   +<------------+ PVC |
<-------------------+              |             |     |
                    |  StatefulSet |             +-----+
                    |              |
                    +-----------+--+
                                ^                +------------+
                                |                |            |
                                +----------------+ Configmaps |
                                                 | Secrets    |
                                                 +------------+

Its lifecycle is managed using Helm and, at the RabbitMQ container level, the following operations are automated: persistence management, configuration based on environment variables and plugin initialization. The StatefulSet do not require any ServiceAccounts with special RBAC privileges so this solution would fit better in more restricted Kubernetes installations.

The bitnami/rabbitmq-operator chart deploys a RabbitMQ Operator installation using a Kubernetes Deployment. The figure below shows the RabbitMQ operator deployment after executing helm install:

+--------------------+
|                    |      +---------------+
|  RabbitMQ Operator |      |               |
|                    |      |     RBAC      |
|     Deployment     |      | Privileges    |
+-------+------------+      +-------+-------+
        ^                           |
        |   +-----------------+     |
        +---+ Service Account +<----+
            +-----------------+

The operator will extend the Kubernetes API with the following object: RabbitmqCluster. From that moment, the user will be able to deploy objects of these kinds and the previously deployed Operator will take care of deploying all the required StatefulSets, ConfigMaps and Services for running a RabbitMQ instance. Its lifecycle is managed using kubectl on the RabbitmqCluster objects. The following figure shows the deployed objects after deploying a RabbitmqCluster object using kubectl:

  +--------------------+
  |                    |      +---------------+
  |  RabbitMQ Operator |      |               |
  |                    |      |     RBAC      |
  |     Deployment     |      | Privileges    |
  +-------+------------+      +-------+-------+
  |     ^                           |
  |     |   +-----------------+     |
  |     +---+ Service Account +<----+
  |         +-----------------+
  |
  |
  |
  |
  |    -------------------------------------------------------------------------
  |    |                                                                       |
  |    |                        +--------------+             +-----+           |
  |    |                        |              |             |     |           |
  |--->|     Service            |   RabbitMQ   +<------------+ PVC |           |
       |    <-------------------+              |             |     |           |
       |                        |  StatefulSet |             +-----+           |
       |                        |              |                               |
       |                        +-----------+--+                               |
       |                                    ^                +------------+    |
       |                                    |                |            |    |
       |                                    +----------------+ Configmaps |    |
       |                                                     | Secrets    |    |
       |                                                     +------------+    |
       |                                                                       |
       |                                                                       |
       -------------------------------------------------------------------------

This solution allows to easily deploy multiple RabbitMQ instances compared to the bitnami/rabbitmq chart. As the operator automatically deploys RabbitMQ installations, the RabbitMQ Operator pods will require a ServiceAccount with privileges to create and destroy multiple Kubernetes objects. This may be problematic for Kubernetes clusters with strict role-based access policies.

Parameters

Global parameters

NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]
global.storageClassGlobal StorageClass for Persistent Volume(s)""

Common parameters

NameDescriptionValue
kubeVersionOverride Kubernetes version""
nameOverrideString to partially override common.names.fullname""
fullnameOverrideString to fully override common.names.fullname""
commonLabelsLabels to add to all deployed objects{}
commonAnnotationsAnnotations to add to all deployed objects{}
clusterDomainKubernetes cluster domain namecluster.local
extraDeployArray of extra objects to deploy with the release[]
diagnosticMode.enabledEnable diagnostic mode (all probes will be disabled)false

RabbitMQ Cluster Operator Parameters

NameDescriptionValue
rabbitmqImage.registryRabbitMQ Image registrydocker.io
rabbitmqImage.repositoryRabbitMQ Image repositorybitnami/rabbitmq
rabbitmqImage.tagRabbitMQ Image tag (immutable tags are recommended)3.10.10-debian-11-r0
rabbitmqImage.digestRabbitMQ image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag""
rabbitmqImage.pullSecretsRabbitMQ Image pull secrets[]
credentialUpdaterImage.registryRabbitMQ Default User Credential Updater image registrydocker.io
credentialUpdaterImage.repositoryRabbitMQ Default User Credential Updater image repositorybitnami/rmq-default-credential-updater
credentialUpdaterImage.tagRabbitMQ Default User Credential Updater image tag (immutable tags are recommended)1.0.2-scratch-r10
credentialUpdaterImage.digestRabbitMQ Default User Credential Updater image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag""
credentialUpdaterImage.pullSecretsRabbitMQ Default User Credential Updater image pull secrets[]
clusterOperator.image.registryRabbitMQ Cluster Operator image registrydocker.io
clusterOperator.image.repositoryRabbitMQ Cluster Operator image repositorybitnami/rabbitmq-cluster-operator
clusterOperator.image.tagRabbitMQ Cluster Operator image tag (immutable tags are recommended)2.0.0-scratch-r4
clusterOperator.image.digestRabbitMQ Cluster Operator image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag""
clusterOperator.image.pullPolicyRabbitMQ Cluster Operator image pull policyIfNotPresent
clusterOperator.image.pullSecretsRabbitMQ Cluster Operator image pull secrets[]
clusterOperator.replicaCountNumber of RabbitMQ Cluster Operator replicas to deploy1
clusterOperator.schedulerNameAlternative scheduler""
clusterOperator.topologySpreadConstraintsTopology Spread Constraints for pod assignment

Deploy rabbitmq-cluster-operator with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has rabbitmq-cluster-operator on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartrabbitmq-cluster-operator is pinned at v3.1.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply