Skip to content

Use a projected key to mount rabbitmq configuration provided by the Operator #361

@Zerpet

Description

@Zerpet

Context

The file rabbitmq.conf should be used by our users to configure their instances of RabbitMQ. The configuration provided by the Operator should be separated from the end-user configuration.

Proposed solution

Leverage /etc/rabbitmq/conf.d location to place Operator configurations of RabbitMQ. The property .spec.rabbitmq.additionalConf should be modified to create a ConfigMap and mount the same as a projected key in /etc/rabbitmq/rabbitmq.conf

Something to test:

  • What's the order of configuration load? First rabbitmq.conf, then conf.d/*.conf. Configuration in conf.d/*.conf have higher precedence over rabbitmq.conf.

Tasks

  • Write our default or "mandatory" configuration first in the ConfigMap. Append contents of .spec.rabbitmq.additionalConfig. We already do this.
  • Use the ConfigMap with rabbitmq.conf key and mount it as a projected key
  • Remove copying the rabbitmq.conf via the init container
  • Change the location of the plugins configuration file *

* /etc/rabbitmq is not an emptyDir anymore. Some Docker images may come with pre-set or vendor configuration already present in /etc/rabbitmq, therefore we should not mount this directory.

Metadata

Metadata

Assignees

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