rabbitmq-cluster

by KlickTipp

Helm chartv3.4.0App 2.23.0Verified publisher

Helm chart to define a RabbitMQ cluster via official rabbitmq.com CRDs (RabbitmqCluster).

About this chart

rabbitmq-cluster

Helm chart to define a RabbitMQ cluster via official rabbitmq.com CRDs (RabbitmqCluster).

Homepage: https://www.rabbitmq.com/kubernetes/operator/operator-overview.html

Source Code

Values

KeyTypeDefaultDescription
nameOverridestring""Override for the Helm chart name.
fullnameOverridestring""Override for the fully-qualified release name.
image.registrystring""RabbitMQ container image registry (e.g. docker.io, ghcr.io, ECR registry host). Empty means no registry prefix.
image.repositorystring"rabbitmq"RabbitMQ container image repository.
image.tagstring"4.3-management-alpine"RabbitMQ container image tag.
pdb.enabledboolfalseCreate a PodDisruptionBudget for RabbitMQ pods.
pdb.maxUnavailableint1maxUnavailable for PodDisruptionBudget (int or percentage string).
ingress.enabledboolfalseCreate an Ingress for RabbitMQ management UI.
ingress.classNamestring""IngressClass name.
ingress.annotationsobject{}Additional annotations for Ingress.
ingress.hostslist[{"host":"chart-example.local","paths":[{"path":"/","pathType":"Prefix"}]}]Ingress host/path rules.
ingress.tlslist[]TLS configuration entries for Ingress.
monitoring.enabledboolfalseEnable monitoring resources created by this chart.
monitoring.queueAlerts.enabledboolfalseCreate queue-specific PrometheusRule alerts from rabbitmq-topology.rabbitmq.topology.queues.
terminationGracePeriodSecondsint600Pod termination grace period in seconds for RabbitMQ pods.
extraObjectslist[]Additional raw Kubernetes objects rendered as-is via tpl.
rabbitmq.cluster.enabledbooltrueCreate the RabbitmqCluster resource.
rabbitmq.cluster.namestring""Name of the RabbitmqCluster resource. If empty, chart fullname is used.
rabbitmq.cluster.replicasint1Number of RabbitMQ replicas.
rabbitmq.cluster.delayStartSecondsint10Delay in seconds before RabbitMQ node starts.
rabbitmq.cluster.persistence.enabledboolfalseEnable persistent volume claim for RabbitMQ data.
rabbitmq.cluster.persistence.storagestring"10Gi"Persistent volume size.
rabbitmq.cluster.persistence.storageClassNamestring""StorageClass name for persistence (empty = cluster default).
rabbitmq.cluster.resourcesobject{}Resource requests/limits for RabbitMQ container.
rabbitmq.cluster.configProfilestringnilPredefined RabbitMQ config profile (PROD, STAGING, DEV) or null.
rabbitmq.cluster.extraConfigstring""Additional RabbitMQ config appended to generated config.
rabbitmq.cluster.additionalPluginslist["rabbitmq_management","rabbitmq_prometheus","rabbitmq_peer_discovery_k8s"]Default RabbitMQ plugins to enable.
rabbitmq.cluster.extraPluginslist[]Extra RabbitMQ plugins to enable in addition to defaults.
rabbitmq.cluster.overrideobject{}Raw override merged into RabbitmqCluster spec.
rabbitmq.cluster.affinityobject{}Pod affinity/anti-affinity for RabbitMQ pods.
rabbitmq-topology.enabledboolfalseEnable the rabbitmq-topology dependency chart.
rabbitmq-topology.rabbitmq.topology.queueDefaultsobject{"arguments":{},"autoDelete":false,"binding":{"destinationType":"queue","enabled":true},"durable":true,"exchange":{"autoDelete":false,"durable":true,"enabled":true,"type":"fanout"},"vhost":""}Pass-through defaults for the rabbitmq-topology subchart. Fallback chain in subchart: object field -> these defaults -> template fallback.
rabbitmq-topology.rabbitmq.topology.queueDefaults.argumentsobject{}Default value for queues.<name>.arguments in the topology subchart. Queue-level arguments override keys from this map.
rabbitmq-topology.rabbitmq.topology.queueDefaults.durablebooltrueDefault value for queues.<name>.durable in the topology subchart. Final template fallback: true.
rabbitmq-topology.rabbitmq.topology.queueDefaults.autoDeleteboolfalseDefault value for queues.<name>.autoDelete in the topology subchart. Final template fallback: false.
rabbitmq-topology.rabbitmq.topology.queueDefaults.vhoststring""Default value for queues.<name>.vhost in the topology subchart. Final template fallback: selected default vhost (/ if none marked default).
rabbitmq-topology.rabbitmq.topology.queueDefaults.exchange.enabledbooltrueDefault value for queues.<name>.exchange.enabled in the topology subchart. Final template fallback: true.
rabbitmq-topology.rabbitmq.topology.queueDefaults.exchange.typestring"fanout"Default value for queues.<name>.exchange.type in the topology subchart. Final template fallback: fanout.
rabbitmq-topology.rabbitmq.topology.queueDefaults.exchange.durablebooltrueDefault value for queues.<name>.exchange.durable in the topology subchart. Final template fallback: true.
rabbitmq-topology.rabbitmq.topology.queueDefaults.exchange.autoDeleteboolfalseDefault value for queues.<name>.exchange.autoDelete in the topology subchart. Final template fallback: false.
rabbitmq-topology.rabbitmq.topology.queueDefaults.binding.enabledbooltrueDefault value for queues.<name>.binding.enabled in the topology subchart. Final template fallback: true.
rabbitmq-topology.rabbitmq.topology.queueDefaults.binding.destinationTypestring"queue"Default value for queues.<name>.binding.destinationType in the topology subchart. Final template fallback: queue.
rabbitmq-topology.rabbitmq.topology.exchangeDefaults.typestring"fanout"Default value for exchanges.<name>.type in the topology subchart. Final template fallback: fanout.
rabbitmq-topology.rabbitmq.topology.exchangeDefaults.durablebooltrueDefault value for exchanges.<name>.durable in the topology subchart. Final template fallback: true.
rabbitmq-topology.rabbitmq.topology.exchangeDefaults.autoDeleteboolfalseDefault value for exchanges.<name>.autoDelete in the topology subchart. Final template fallback: false.
rabbitmq-topology.rabbitmq.topology.exchangeDefaults.vhoststring""Default value for exchanges.<name>.vhost in the topology subchart. Final template fallback: selected default vhost (/ if none marked default).
rabbitmq-topology.rabbitmq.topology.bindingDefaults.vhoststring""Default value for bindings.<name>.vhost in the topology subchart. Final template fallback: selected default vhost (/ if none marked default).
rabbitmq-topology.rabbitmq.topology.bindingDefaults.destinationTypestring"queue"Default value for bindings.<name>.destinationType in the topology subchart. Final template fallback: queue.
rabbitmq-topology.rabbitmq.topology.policyDefaults.vhoststring""Default value for policies.<name>.vhost in the topology subchart. Final template fallback: selected default vhost (/ if none marked default).
rabbitmq-topology.rabbitmq.topology.policyDefaults.priorityint0Default value for policies.<name>.priority in the topology subchart. Final template fallback: 0.
rabbitmq-topology.rabbitmq.topology.policyDefaults.applyTostring""Default value for policies.<name>.applyTo in the topology subchart. Final template fallback: required on each policy if empty here.
rabbitmq-topology.rabbitmq.topology.permissionDefaults.referenceTypestring"userReference"Default value for users.<name>.permission.referenceType in the topology subchart (userReference or user). Final template fallback: userReference.
rabbitmq-topology.rabbitmq.topology.permissionDefaults.enabledbooltrueDefault value for users.<name>.permission.enabled in the topology subchart. Final template fallback: true.
rabbitmq-topology.rabbitmq.topology.permissionDefaults.vhoststring""Default value for users.<name>.permission.vhost in the topology subchart. Final template fallback: selected default vhost (/ if none marked default).
rabbitmq-topology.rabbitmq.topology.permissionDefaults.configurestring".*"Default value for users.<name>.permission.configure in the topology subchart. Final template fallback: .*.
rabbitmq-topology.rabbitmq.topology.permissionDefaults.writestring".*"Default value for users.<name>.permission.write in the topology subchart. Final template fallback: .*.
rabbitmq-topology.rabbitmq.topology.permissionDefaults.readstring".*"Default value for users.<name>.permission.read in the topology subchart. Final template fallback: .*.
rabbitmq-topology.rabbitmq.topology.queuesobject{}Map of queue definitions. Per entry you can set metadataName to override Kubernetes metadata.name.
rabbitmq-topology.rabbitmq.topology.exchangesobject{}Map of exchange definitions. Per entry you can set metadataName to override Kubernetes metadata.name.
rabbitmq-topology.rabbitmq.topology.bindingsobject{}Map of binding definitions. Per entry you can set metadataName to override Kubernetes metadata.name.
rabbitmq-topology.rabbitmq.topology.policiesobject{}Map of policy definitions. Per entry you can set metadataName to override Kubernetes metadata.name.
rabbitmq-topology.rabbitmq.topology.usersobject{}Map of user definitions. Per entry you can set metadataName for User and permission.metadataName for Permission. For migration, permission.referenceType supports userReference (default) or legacy user.
rabbitmq-topology.rabbitmq.vhostsobject{}Map of vhost definitions. Per entry you can set metadataName to override Kubernetes metadata.name.

Examples

1. Cluster only

rabbitmq:
  cluster:
    enabled: true
    name: app-rabbitmq
    replicas: 3
    persistence:
      enabled: true
      storage: 20Gi
      storageClassName: kt-gp3

2. Cluster + topology subchart

rabbitmq:
  cluster:
    enabled: true
    name: app-rabbitmq

rabbitmq-topology:
  enabled: true
  rabbitmq:
    cluster:
      name: app-rabbitmq
    vhosts:
      app:
        enabled: true
        default: true
        name: app
    topology:
      queueDefaults:
        arguments:
          x-queue-type: quorum
        exchange:
          enabled: false
        binding:
          enabled: false
      exchanges:
        app-events:
          type: direct
          durable: true
          autoDelete: false
          vhost: app
      queues:
        email-request:
          name: email_request
          durable: true
          autoDelete: false
          vhost: app
      bindings:
        email-request:
          source: app-events
          destination: email_request
          destinationType: queue
          routingKey: email_request
          vhost: app

3. Topology to external cluster

rabbitmq:
  cluster:
    enabled: false

rabbitmq-topology:
  enabled: true
  rabbitmq:
    cluster:
      name: existing-rabbitmq
    topology:
      exchanges:
        app-events:
          type: topic

4. Users from existing secrets (e.g. 1Password)

rabbitmq-topology:
  enabled: true
  rabbitmq:
    topology:
      users:
        app-user:
          metadataName: app-user
          existingSecret: rabbitmq-user-app
          permission:
            referenceType: userReference
            metadataName: app-user
            enabled: true
            vhost: "/"
            configure: ".*"
            write: ".*"
            read: ".*"

5. Users with chart-managed secrets

rabbitmq-topology:
  enabled: true
  rabbitmq:
    topology:
      users:
        smtp-user:
          metadataName: smtp-user
          password: "change-me"
          permission:
            referenceType: userReference
            metadataName: smtp-user
            enabled: true
            vhost: "/"
            configure: ".*"
            write: ".*"
            read: ".*"

6. Legacy Permission migration (spec.user)

rabbitmq-topology:
  enabled: true
  rabbitmq:
    topology:
      users:
        app-user:
          name: app-user
          existingSecret: rabbitmq-user-app
          permission:
            metadataName: app-user
            referenceType: user
            user: app-user
            vhost: "/"

7. Preserve existing Kubernetes resource names (metadata.name)

rabbitmq-topology:
  enabled: true
  rabbitmq:
    vhosts:
      app:
        name: app
        metadataName: app
    topology:
      exchanges:
        app-events:
          name: app-events
          metadataName: app-events
          type: direct
          vhost: app
      queues:
        email-request:
          name: email_request
          metadataName: email-request
          vhost: app
          exchange:
            enabled: false
          binding:
            enabled: false
      bindings:
        email-request:
          metadataName: email-request
          source: app-events
          destination: email_request
          destinationType: queue
          vhost: app
     

Deploy rabbitmq-cluster 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 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 is pinned at v3.4.0 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