Rabbitmq: how does the OPERATOR_SCOPE_NAMESPACE work
search cancel

Rabbitmq: how does the OPERATOR_SCOPE_NAMESPACE work

book

Article ID: 376836

calendar_today

Updated On:

Products

VMware RabbitMQ VMware Tanzu RabbitMQ Support Only for OpenSource RabbitMQ Pivotal RabbitMQ

Issue/Introduction

This guide will show how the OPERATOR_SCOPE_NAMESPACE does in the real environment.

 

The OPERATOR_SCOPE_NAMESPACE option will reconcile the source in the name space which is defined in the OPERATOR_SCOPE_NAMESPACE.

For example, if you configure the test1 and test2 namespace in the OPERATOR_SCOPE_NAMESPACE, the cluster operator will only monitor and reconcile the resource in these two namespaces.

 

Resolution

Below is the demo scenario of the OPERATOR_SCOPE_NAMESPACE.

 

  • Firstly create two news namespace test1 and test2

 

  • Edit the cluster operator with below command:

kubectl -n rabbitmq-system edit deployment rabbitmq-cluster-operator

 

  • Add test1 and test2 to the OPERATOR_SCOPE_NAMESPACE

  • Create the rabbitmq instance in the test1 and test2 manually

 

The cluster operator will monitor and reconcile the resource for you if you unexpectedly delete the rabbitmq pod in these two namespaces.

 

The operator will only reconcile the existing resources, in other words, for the first time, you must create the rabbitmq instance manually.

 

 

Please refer to the guide for more information.

https://www.rabbitmq.com/kubernetes/operator/configure-operator-defaults