rabbitmq

by groundhog2k

Helm chartv2.3.11App 4.4.1

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

KeyTypeDefaultDescription
fullnameOverridestring""Fully override the deployment name
nameOverridestring""Partially override the deployment name

Deployment parameters

KeyTypeDefaultDescription
image.pullPolicystring"IfNotPresent"Image pull policy
image.registrystring"docker.io"Image registry
image.repositorystring"rabbitmq"Image name
image.tagstring""Image tag
initImage.pullPolicystring"IfNotPresent"Init image pull policy
initImage.registrystring"docker.io"Image registry
initImage.repositorystring"busybox"Init image name
initImage.tagstring"stable"Init image tag
imagePullSecretslist[]Image pull secrets
extraInitContainerslist[]Extra init containers
extaContainerslist[]Extra containers for usage as sidecars
startupProbeobjectsee values.yamlStartup probe configuration
livenessProbeobjectsee values.yamlLiveness probe configuration
readinessProbeobjectsee values.yamlReadiness probe configuration
customStartupProbeobject{}Custom startup probe (overwrites default startup probe configuration)
customLivenessProbeobject{}Custom liveness probe (overwrites default liveness probe configuration)
customReadinessProbeobject{}Custom readiness probe (overwrites default readiness probe configuration)
initResourcesobject{}Resource limits and requests for the default init container
resourcesobject{}Resource limits and requests
priorityClassNamestring""Deployment priority class name
nodeSelectorobject{}Deployment node selector
customLabelsobject{}Additional labels for Deployment or StatefulSet
customAnnotationsobject{}Additional annotations for Deployment or StatefulSet
podAnnotationsobject{}Additional pod annotations
podLabelsobject{}Additional pod labels
podSecurityContextobjectsee values.yamlPod security context
securityContextobjectsee values.yamlContainer security context
envlist[]Additional container environmment variables
argslist[]Additional container command arguments
terminationGracePeriodSecondsint60Container termination grace period in seconds
rbac.createbooltrueEnable creation of RBAC
serviceAccount.annotationsobject{}Additional service account annotations
serviceAccount.createbooltrueEnable service account creation
serviceAccount.namestring""Optional name of the service account
affinityobject{}Affinity for pod assignment
tolerationslist[]Tolerations for pod assignment
topologySpreadConstraintsobject{}Topology spread constraints for pods
podManagementPolicystring"OrderedReady"Pod management policy
updateStrategyTypestring"RollingUpdate"Pod update strategy
replicaCountint1Number of replicas
revisionHistoryLimitintnilMaximum number of revisions maintained in revision history
podDisruptionBudgetobject{}Pod disruption budget
podDisruptionBudget.minAvailableintnilMinimum number of pods that must be available after eviction
podDisruptionBudget.maxUnavailableintnilMaximum number of pods that can be unavailable after eviction

Service parameters

KeyTypeDefaultDescription
service.typestring"ClusterIP"Service type
service.clusterIPstringnilThe cluster ip address (only relevant for type LoadBalancer or NodePort)
service.loadBalancerIPstringnilThe load balancer ip address (only relevant for type LoadBalancer)
service.loadBalancerSourceRangeslist[]The list of IP CIDR ranges that are allowed to access the load balancer (only relevent for type LoadBalancer)
service.amqp.portint5672AMQP service port
service.amqp.nodePortintnilService node port (only relevant for type LoadBalancer or NodePort)
service.amqps.portint5671Secure AMQP service port
service.amqps.nodePortintnilService node port (only relevant for type LoadBalancer or NodePort)
service.mgmt.portint15672Management UI service port
service.mgmt.nodePortintnilService node port (only relevant for type LoadBalancer or NodePort)
service.prometheus.portint15692Prometheus service port
service.prometheus.nodePortintnilService node port (only relevant for type LoadBalancer or NodePort)
service.annotationsobject{}Additional service annotations
service.labelsobject{}Additional service labels
service.extraPorts[].namestringnilUnique name of the container port
service.extraPorts[].protocolstringTCPProtocol type (TCP / UDP)
service.extraPorts[].containerPortintnilContainer port
service.extraPorts[].portintnilService port
service.extraPorts[].nodePortintnilThe node port (only relevant for type LoadBalancer or NodePort)

Extra services parameters

Section to define custom services

KeyTypeDefaultDescription
extraServices[].namestringnilUnique name of the input service
extraServices[].typestringnilService type (ClusterIP / NodePort / LoadBalancer)
extraServices[].protocolstringnilProtocol type (TCP / UDP)
extraServices[].containerPortintnilContainer port
extraServices[].portintnilService port
extraServices[].nodePortintnilThe node port (only relevant for type LoadBalancer or NodePort)
extraServices[].clusterIPstringnilThe cluster ip address (only relevant for type LoadBalancer or NodePort)
extraServices[].loadBalancerIPstringnilThe load balancer ip address (only relevant for type LoadBalancer)
extraServices[].loadBalancerSourceRangeslist[]The list of IP CIDR ranges that are allowed to access the load balancer (only relevent for type LoadBalancer)
extraServices[].annotationsobject{}Additional service annotations
extraServices[].labelsobject{}Additional service labels

Service monitor parameters

KeyTypeDefaultDescription
serviceMonitor.enabledboolfalseEnable service monitor
serviceMonitor.additionalLabelsobject{}Additional labels for the service monitor object
serviceMonitor.annotationsobject{}Annotations for the service monitor object
serviceMonitor.extraParametersobjectnilExtra parameters rendered to the service monitor object
serviceMonitor.default.enabledbooltrueEnable default metrics endpoint '/metrics'
serviceMonitor.default.intervalDuration30sScrape interval for prometheus
serviceMonitor.default.scrapeTimeoutDurationnilScrape timeout value
serviceMonitor.default.extraEndpointParametersobject{}Extra parameters rendered to the service monitor endpoint
serviceMonitor.detailed.enabledboolfalseEnables collecting from detailed metrics endpoint of RabbitMQ
serviceMonitor.detailed.familylist[]List of metric families to collect
serviceMonitor.detailed.intervalDuration30sScrape interval for detailed metrics
serviceMonitor.detailed.scrapeTimeoutDurationnilScrape timeout value for detailed metrics
serviceMonitor.perObject.enabledboolfalseEnables collecting from per-object metrics endpoint of RabbitMQ
serviceMonitor.perObject.intervalDuration30sScrape interval for detailed metrics
serviceMonitor.perObject.scrapeTimeoutDurationnilScrape timeout value for detailed metrics

Storage parameters

KeyTypeDefaultDescription
storage.accessModes[0]string"ReadWriteOnce"Storage access mode
storage.persistentVolumeClaimNamestringnilPVC name when existing storage volume should be used
storage.volumeNamestring"rabbitmq-volume"Internal volume name
storage.requestedSizestringnilSize for new PVC, when no existing PVC is used
storage.classNamestringnilStorage class name
storage.annotationsobject{}Additional storage annotations
storage.labelsobject{}Additional storage labels
extraStoragelist[]A list of additional existing PVC that will be mounted into the container
extraStorage[].namestringnilInternal name of the volume
extraStorage[].pvcNamestringnilName of the existing PVC
extraStorage[].mountPathstringnilMount path where the PVC should be mounted into the container

Ingress parameters

KeyTypeDefaultDescription
ingress.enabledboolfalseEnable ingress for the Management UI service
ingress.classNamestringnilOptional ingress class name
ingress.annotationsobject{}Additional annotations for ingress
ingress.labelsobject{}Additional ingress lables
ingress.hosts[0].hoststring""Hostname for the ingress endpoint
ingress.hosts[0].host.paths[0].pathstring"/"Path for the RabbitMQ Management UI
ingress.hosts[0].host.paths[0].pathTypestring"ImplementationSpecific"Ingress path type (ImplementationSpecific, Prefix, Exact)
ingress.tlslist[]Ingress TLS parameters

HTTPRoute parameters

KeyTypeDefaultDescription
httpRoute.enabledboolfalseEnable HTTPRoute for the Management UI service
httpRoute.annotationsobject{}Additional HTTPRoute annotations
httpRoute.labelsobject{}Additional HTTPRoute labels
httpRoute.parentRefslist[]Gateway parent references (required when httpRoute is enabled and listenerSet is disabled)
httpRoute.hostnameslist[]Hostnames for the HTTPRoute
httpRoute.ruleslistsee values.yamlHTTPRoute rules for the Management UI service

ListenerSet parameters

KeyTypeDefaultDescription
listenerSet.enabledboolfalseEnable ListenerSet for Gateway API
listenerSet.annotationsobject{}Additional ListenerSet annotations
listenerSet.labelsobject{}Additional ListenerSet labels
listenerSet.parentRefobject{}Gateway parent reference (required)
listenerSet.listenerslist[]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

KeyTypeDefaultDescription
networkPolicy.ingressobject{}Ingress network policies
networkPolicy.egressobject{}Egress network policies

RabbitMQ base parameters

KeyTypeDefaultDescription
clusterDomainstring"cluster.local"Kubernetes cluster domain (DNS) suffix
pluginslist[]List of additional RabbitMQ plugins that should be activated (see: RabbitMQ plugins)
authentication.existingSecretstringnilOptional existing secret for the authentication parameters
authentication.user.secretKeystringnilKey of existingSecret for the initial user name
authentication.user.valuestringnilInitial user name (guest) (Alternative: Set environment variable RABBITMQ_DEFAULT_USER) (if no existingSecret was specified)
authentication.password.secretKeystringnilKey of existingSecret for the initial user password
authentication.password.valuestringnilInitial password (guest) (Alternative: set environment variable RABBITMQ_DEFAULT_PASS) (if no existingSecret was specified)
authentication.erlangCookie.secretKeystringnil

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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartrabbitmq is pinned at v2.3.11 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