We have an old installation of RabbitMQ using the now deprecated diy-kubernetes setup guide and are looking to migrate to the new and improved cluster operator. I'm currently stuck trying to replicate the policy below into a kubernetes policy manifest file.
I have tried changing the ha-mode to 'exactly' and un-commenting the ha-params line to get a policy that matches the one in the screenshot above but I've been unsuccessful with the following error from the messaging topology operator pod's logs:
Validation failed\n\nha-mode="exactly" takes an integer, none │
│
given\n","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\t/bitnami/blacksmith-sandox/rmq-messaging-topology-operator-1.8.0/pkg/mod/sigs.k8s.
│
│
io/controlle...@v0.12.3/pkg/internal/controller/controller.go:273\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/bitnami/blacksmith-sandox/rmq-messagin
│
│ g-topology-operator-1.8.0/pkg/mod/sigs.k8s.io/controlle...@v0.12.3/pkg/internal/controller/controller.go:234"}
I want to mirror my queues across two nodes, not all. Can anyone share steps to accomplish this using the cluster operator?
I can login to one of the pods and manually execute the following, but I'm looking to define it declaratively.
rabbitmqctl set_policy --priority 1 --apply-to
queues ha '^(?!amq\.).*'
'{"ha-mode":"exactly","ha-params":2,"ha-sync-mode":"automatic"}'