rabbitmq / OLM-Package-Repo

Script to generate OLM (Operator-LifeCycle-Manager) Bundles for RabbitMQ Kubernetes operators
MIT License
0 stars 2 forks source link

consume metadata.annotations['olm.targetNamespaces'] to allow single/… #17

Closed DanielePalaia closed 3 months ago

DanielePalaia commented 3 months ago

There is actually a bug when we do a single/multiple namespace installation mode.

At the moment we use OPERATOR_SCOPE_NAMESPACE env variable in order to specify the namespaces where the operator will reconcile and watch RabbitmqClusters.

In OLM this is implemented through an operator group (og): https://docs.openshift.com/container-platform/4.8/operators/understanding/olm/olm-understanding-operatorgroups.html

In order to allow an operator group to work properly the csv needs to consume metadata.annotations['olm.targetNamespaces'] and pass it to our OPERATOR_SCOPE_NAMESPACE env variable.

I have implemented this through ytt as we already use it throughout the code.

DanielePalaia commented 3 months ago

I will integrate this one to ship in the next release, tested and it looks good