Skip to content

Allow setting sizeLimit when persistence disabled #2017

Description

@miguelmdh

Is your feature request related to a problem? Please describe.

When no persistence is used with a RabbitmqCluster, the Operator sets an emptyDir volume for the persistence:

    - name: persistence
      emptyDir: {}

This causes that in the RabbitMQ UI, the available disk is the host's disk:

Image

This introduces a potential problem in the host, since its disk may fill up and a RabbitMQ cluster can affect the rest workloads of the host.

Describe the solution you'd like

Kubernetes lets to set the sizeLimit for an empty dir: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir-configuration-example

The Operator could add a sizeLimit when no persistence is used. Questions we ask ourselves:

  • What is the default value for sizeLimit?
  • Should the user modify this value? If so, shoud the CRD be modified to add a new field?
  • What about other related fields, such as the disk threshold alarm?

Describe alternatives you've considered

  • Use a default value for sizeLimit (500Mb) that can be overridden by an annotation.
  • Have a disk usage limit alarm. RabbitMQ now defines the disk_free_limit.absolute alarm, which allows to define an alarm when the disk has less that the specified amount of space. We propose the opposite: setting an alarm when disk usage exceeds a specified amount of space.

Activity

  1. MirahImage commented on Dec 1, 2025

    @MirahImage
    Member

    The option of using an emptyDir is only intended for short-lived development purposes, for example, when running locally on kind, and should never be used in other circumstances. If you are deploying a long-lived RabbitMQ cluster, then it should always have dedicated persistent volumes for storage.

  2. locked and limited conversation to collaborators on Dec 1, 2025
  3. converted this issue into a discussion #2018 on Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions