nats-operator icon indicating copy to clipboard operation
nats-operator copied to clipboard

What are the possible undesirable effects of using the experimental Cluster-scoped installation

Open Manuri opened this issue 6 years ago • 1 comments

In the README.md it is mentioned that Cluster-scoped installation is experimental.

What are the possible undesirable effects of using this?

We are planning to use this for an automated testing effort which would create a NATS cluster once a week on a GKE k8s cluster and run some tests against that. Multiple deployments can get created simultaneously on this k8s cluster since the cluster is reused for multiple tests.

Just need to verify if this is safe enough for that kind of a scenario.

Manuri avatar Oct 15 '19 06:10 Manuri

Cluster-scoped operator instance(s) may overlap with namespace-scoped operator instance(s) because they'll rely on different namespaces for doing leader-election. This means you'll have two or more instances of the operator managing a same set of NATS clusters, resulting in collisions.

To be more precise on the leader-election side of things, each operator instance knows where to look for to learn whether it should manage NATS clusters or not, so that only one instance at a time manages NATS clusters. The where is where a problem may surface, since it's a namespaced resource. If two instances of the operator look into two different namespaces for said resource.

pires avatar Dec 11 '19 10:12 pires