Closed joelsmith closed 1 year ago
On hold pending discussion
Edit: discussed with my team and we're thinking that it would be nice to support both install modes even though the mode won't affect the operator's behavior. The advantage of supporting both is flexibility in being able to be installed in a namespace already configured for AllNamespaces
. For example, on OpenShift, we recommend installing in the openshift-keda
namespace, but on some OpenShift versions like Red Hat OpenShift on AWS (ROSA), the cluster admin isn't allowed to create that namespace, but could install to the openshift-operators
namespace, except for the fact that it requires the AllNamespaces
install mode. So that's why this PR exists -- to make it work in both scenarios.
In #192 there was an attempt to change the CSV to change the installMode from
OwnNamepsace
toAllNamespaces
, but that change was lost during the next bundle re-generation. This PR re-makes that change in both the config and the bundle, but allows the operator to be installed in either mode. This provides flexibility allowing the operator to be installed into existing namespaces, potentially with other operators present, where theOperatorGroup
is already present and annotated to require one or the other.With the installMode
AllNamespaces
,WATCH_NAMESPACE
may not be set especially in cases where the operator is installed to an existing namespace with an existingoperatorgroup
. This change allows the KEDA OLM operator to work whether it is run with aWATCH_NAMESPACE
env var or not.Checklist