rabbitmq
by groundhog2k
A Helm chart for a RabbitMQ cluster on Kubernetes
About this chart
RabbitMQ
A Helm chart for a RabbitMQ HA-cluster on Kubernetes
Changelog
see RELEASENOTES.md
⚠️ Please make sure all feature flags are enabled before upgrading to RabbitMQ 3.12.x / 3.13.x / 4.x
⚠️ Disable mirroring for classic queues before upgrading to RabbitMQ 4.x
TL;DR
helm repo add groundhog2k https://groundhog2k.github.io/helm-charts/
helm install my-release groundhog2k/rabbitmq
Introduction
This chart uses the original RabbitMQ image from Docker Hub to deploy a stateful RabbitMQ cluster in Kubernetes.
It fully supports deployment of the multi-architecture docker image.
Prerequisites
- Kubernetes 1.12+
- Helm 3.x
- PV provisioner support in the underlying infrastructure
Installing the Chart
To install the chart with the release name my-release:
helm install my-release groundhog2k/rabbitmq
Uninstalling the Chart
To uninstall/delete the my-release deployment:
helm uninstall my-release
Common parameters
| Key | Type | Default | Description |
|---|---|---|---|
| fullnameOverride | string | "" | Fully override the deployment name |
| nameOverride | string | "" | Partially override the deployment name |
Deployment parameters
| Key | Type | Default | Description |
|---|---|---|---|
| image.pullPolicy | string | "IfNotPresent" | Image pull policy |
| image.registry | string | "docker.io" | Image registry |
| image.repository | string | "rabbitmq" | Image name |
| image.tag | string | "" | Image tag |
| initImage.pullPolicy | string | "IfNotPresent" | Init image pull policy |
| initImage.registry | string | "docker.io" | Image registry |
| initImage.repository | string | "busybox" | Init image name |
| initImage.tag | string | "stable" | Init image tag |
| imagePullSecrets | list | [] | Image pull secrets |
| extraInitContainers | list | [] | Extra init containers |
| extaContainers | list | [] | Extra containers for usage as sidecars |
| startupProbe | object | see values.yaml | Startup probe configuration |
| livenessProbe | object | see values.yaml | Liveness probe configuration |
| readinessProbe | object | see values.yaml | Readiness probe configuration |
| customStartupProbe | object | {} | Custom startup probe (overwrites default startup probe configuration) |
| customLivenessProbe | object | {} | Custom liveness probe (overwrites default liveness probe configuration) |
| customReadinessProbe | object | {} | Custom readiness probe (overwrites default readiness probe configuration) |
| initResources | object | {} | Resource limits and requests for the default init container |
| resources | object | {} | Resource limits and requests |
| priorityClassName | string | "" | Deployment priority class name |
| nodeSelector | object | {} | Deployment node selector |
| customLabels | object | {} | Additional labels for Deployment or StatefulSet |
| customAnnotations | object | {} | Additional annotations for Deployment or StatefulSet |
| podAnnotations | object | {} | Additional pod annotations |
| podLabels | object | {} | Additional pod labels |
| podSecurityContext | object | see values.yaml | Pod security context |
| securityContext | object | see values.yaml | Container security context |
| env | list | [] | Additional container environmment variables |
| args | list | [] | Additional container command arguments |
| terminationGracePeriodSeconds | int | 60 | Container termination grace period in seconds |
| rbac.create | bool | true | Enable creation of RBAC |
| serviceAccount.annotations | object | {} | Additional service account annotations |
| serviceAccount.create | bool | true | Enable service account creation |
| serviceAccount.name | string | "" | Optional name of the service account |
| affinity | object | {} | Affinity for pod assignment |
| tolerations | list | [] | Tolerations for pod assignment |
| topologySpreadConstraints | object | {} | Topology spread constraints for pods |
| podManagementPolicy | string | "OrderedReady" | Pod management policy |
| updateStrategyType | string | "RollingUpdate" | Pod update strategy |
| replicaCount | int | 1 | Number of replicas |
| revisionHistoryLimit | int | nil | Maximum number of revisions maintained in revision history |
| podDisruptionBudget | object | {} | Pod disruption budget |
| podDisruptionBudget.minAvailable | int | nil | Minimum number of pods that must be available after eviction |
| podDisruptionBudget.maxUnavailable | int | nil | Maximum number of pods that can be unavailable after eviction |
Service parameters
| Key | Type | Default | Description |
|---|---|---|---|
| service.type | string | "ClusterIP" | Service type |
| service.clusterIP | string | nil | The cluster ip address (only relevant for type LoadBalancer or NodePort) |
| service.loadBalancerIP | string | nil | The load balancer ip address (only relevant for type LoadBalancer) |
| service.loadBalancerSourceRanges | list | [] | The list of IP CIDR ranges that are allowed to access the load balancer (only relevent for type LoadBalancer) |
| service.amqp.port | int | 5672 | AMQP service port |
| service.amqp.nodePort | int | nil | Service node port (only relevant for type LoadBalancer or NodePort) |
| service.amqps.port | int | 5671 | Secure AMQP service port |
| service.amqps.nodePort | int | nil | Service node port (only relevant for type LoadBalancer or NodePort) |
| service.mgmt.port | int | 15672 | Management UI service port |
| service.mgmt.nodePort | int | nil | Service node port (only relevant for type LoadBalancer or NodePort) |
| service.prometheus.port | int | 15692 | Prometheus service port |
| service.prometheus.nodePort | int | nil | Service node port (only relevant for type LoadBalancer or NodePort) |
| service.annotations | object | {} | Additional service annotations |
| service.labels | object | {} | Additional service labels |
| service.extraPorts[].name | string | nil | Unique name of the container port |
| service.extraPorts[].protocol | string | TCP | Protocol type (TCP / UDP) |
| service.extraPorts[].containerPort | int | nil | Container port |
| service.extraPorts[].port | int | nil | Service port |
| service.extraPorts[].nodePort | int | nil | The node port (only relevant for type LoadBalancer or NodePort) |
Extra services parameters
Section to define custom services
| Key | Type | Default | Description |
|---|---|---|---|
| extraServices[].name | string | nil | Unique name of the input service |
| extraServices[].type | string | nil | Service type (ClusterIP / NodePort / LoadBalancer) |
| extraServices[].protocol | string | nil | Protocol type (TCP / UDP) |
| extraServices[].containerPort | int | nil | Container port |
| extraServices[].port | int | nil | Service port |
| extraServices[].nodePort | int | nil | The node port (only relevant for type LoadBalancer or NodePort) |
| extraServices[].clusterIP | string | nil | The cluster ip address (only relevant for type LoadBalancer or NodePort) |
| extraServices[].loadBalancerIP | string | nil | The load balancer ip address (only relevant for type LoadBalancer) |
| extraServices[].loadBalancerSourceRanges | list | [] | The list of IP CIDR ranges that are allowed to access the load balancer (only relevent for type LoadBalancer) |
| extraServices[].annotations | object | {} | Additional service annotations |
| extraServices[].labels | object | {} | Additional service labels |
Service monitor parameters
| Key | Type | Default | Description |
|---|---|---|---|
| serviceMonitor.enabled | bool | false | Enable service monitor |
| serviceMonitor.additionalLabels | object | {} | Additional labels for the service monitor object |
| serviceMonitor.annotations | object | {} | Annotations for the service monitor object |
| serviceMonitor.extraParameters | object | nil | Extra parameters rendered to the service monitor object |
| serviceMonitor.default.enabled | bool | true | Enable default metrics endpoint '/metrics' |
| serviceMonitor.default.interval | Duration | 30s | Scrape interval for prometheus |
| serviceMonitor.default.scrapeTimeout | Duration | nil | Scrape timeout value |
| serviceMonitor.default.extraEndpointParameters | object | {} | Extra parameters rendered to the service monitor endpoint |
| serviceMonitor.detailed.enabled | bool | false | Enables collecting from detailed metrics endpoint of RabbitMQ |
| serviceMonitor.detailed.family | list | [] | List of metric families to collect |
| serviceMonitor.detailed.interval | Duration | 30s | Scrape interval for detailed metrics |
| serviceMonitor.detailed.scrapeTimeout | Duration | nil | Scrape timeout value for detailed metrics |
| serviceMonitor.perObject.enabled | bool | false | Enables collecting from per-object metrics endpoint of RabbitMQ |
| serviceMonitor.perObject.interval | Duration | 30s | Scrape interval for detailed metrics |
| serviceMonitor.perObject.scrapeTimeout | Duration | nil | Scrape timeout value for detailed metrics |
Storage parameters
| Key | Type | Default | Description |
|---|---|---|---|
| storage.accessModes[0] | string | "ReadWriteOnce" | Storage access mode |
| storage.persistentVolumeClaimName | string | nil | PVC name when existing storage volume should be used |
| storage.volumeName | string | "rabbitmq-volume" | Internal volume name |
| storage.requestedSize | string | nil | Size for new PVC, when no existing PVC is used |
| storage.className | string | nil | Storage class name |
| storage.annotations | object | {} | Additional storage annotations |
| storage.labels | object | {} | Additional storage labels |
| extraStorage | list | [] | A list of additional existing PVC that will be mounted into the container |
| extraStorage[].name | string | nil | Internal name of the volume |
| extraStorage[].pvcName | string | nil | Name of the existing PVC |
| extraStorage[].mountPath | string | nil | Mount path where the PVC should be mounted into the container |
Ingress parameters
| Key | Type | Default | Description |
|---|---|---|---|
| ingress.enabled | bool | false | Enable ingress for the Management UI service |
| ingress.className | string | nil | Optional ingress class name |
| ingress.annotations | object | {} | Additional annotations for ingress |
| ingress.labels | object | {} | Additional ingress lables |
| ingress.hosts[0].host | string | "" | Hostname for the ingress endpoint |
| ingress.hosts[0].host.paths[0].path | string | "/" | Path for the RabbitMQ Management UI |
| ingress.hosts[0].host.paths[0].pathType | string | "ImplementationSpecific" | Ingress path type (ImplementationSpecific, Prefix, Exact) |
| ingress.tls | list | [] | Ingress TLS parameters |
HTTPRoute parameters
| Key | Type | Default | Description |
|---|---|---|---|
| httpRoute.enabled | bool | false | Enable HTTPRoute for the Management UI service |
| httpRoute.annotations | object | {} | Additional HTTPRoute annotations |
| httpRoute.labels | object | {} | Additional HTTPRoute labels |
| httpRoute.parentRefs | list | [] | Gateway parent references (required when httpRoute is enabled and listenerSet is disabled) |
| httpRoute.hostnames | list | [] | Hostnames for the HTTPRoute |
| httpRoute.rules | list | see values.yaml | HTTPRoute rules for the Management UI service |
ListenerSet parameters
| Key | Type | Default | Description |
|---|---|---|---|
| listenerSet.enabled | bool | false | Enable ListenerSet for Gateway API |
| listenerSet.annotations | object | {} | Additional ListenerSet annotations |
| listenerSet.labels | object | {} | Additional ListenerSet labels |
| listenerSet.parentRef | object | {} | Gateway parent reference (required) |
| listenerSet.listeners | list | [] | Listeners to attach to the parent Gateway |
Network policies
Allows to define optional network policies for ingress and egress The policyTypes will be automatically set
| Key | Type | Default | Description |
|---|---|---|---|
| networkPolicy.ingress | object | {} | Ingress network policies |
| networkPolicy.egress | object | {} | Egress network policies |
RabbitMQ base parameters
| Key | Type | Default | Description |
|---|---|---|---|
| clusterDomain | string | "cluster.local" | Kubernetes cluster domain (DNS) suffix |
| plugins | list | [] | List of additional RabbitMQ plugins that should be activated (see: RabbitMQ plugins) |
| authentication.existingSecret | string | nil | Optional existing secret for the authentication parameters |
| authentication.user.secretKey | string | nil | Key of existingSecret for the initial user name |
| authentication.user.value | string | nil | Initial user name (guest) (Alternative: Set environment variable RABBITMQ_DEFAULT_USER) (if no existingSecret was specified) |
| authentication.password.secretKey | string | nil | Key of existingSecret for the initial user password |
| authentication.password.value | string | nil | Initial password (guest) (Alternative: set environment variable RABBITMQ_DEFAULT_PASS) (if no existingSecret was specified) |
| authentication.erlangCookie.secretKey | string | nil |
Deploy rabbitmq with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has rabbitmq 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartrabbitmq is pinned at v2.3.11 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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