opensearch-k8s-operator icon indicating copy to clipboard operation
opensearch-k8s-operator copied to clipboard

Operator doesn't work if deployed in different namespaces

Open Leen15 opened this issue 2 years ago • 1 comments

With the PR #158 you added the option to use the operator inside a specific namespace. It works, but only if deployed in a single namespace. The issue is related to ClusterRole / ClusterRoleBinding: they have the namespace in there but they keep the same name also if you deploy the operator in multiple namespaces: photo_2022-07-25 11 08 51

In this way if you try to deploy the operator in two different namespaces only the last one will work (because it overrides ClusterRole / ClusterRoleBinding with same name changing only the namespace value): image

Other operators add the namespace dynamically to ClusterRole / ClusterRoleBinding name so there are no conflicts: image

Leen15 avatar Jul 25 '22 09:07 Leen15

Hi @Leen15 . Thank you for the report. You are absolutely right. We'll need to add a namespace/helm-release-specific suffix to all objects in the helm-chart that are not namespaced.

swoehrl-mw avatar Jul 27 '22 13:07 swoehrl-mw