enmasse icon indicating copy to clipboard operation
enmasse copied to clipboard

Add WATCH_NAMESPACE env var to operator deployment

Open davidffrench opened this issue 4 years ago • 2 comments

Overview It is recommended to add the WATCH_NAMESPACE environment variable to an operators deployment[1], which will allow the generate csv command to modify the value of this to "metadata.annotations['olm.targetNamespaces']". Currently, the enmasse operator deployment has an env var called NAMESPACE[2].

I am not sure if the NAMESPACE env var is used internally in the enmasse operator or if there is a limitation stopping the addition of WATCH_NAMESPACE or replacing the NAMESPACE env var.

[1] https://github.com/operator-framework/operator-sdk/blob/8a8e2b160afff3741c676e79862d0134b14a6e59/internal/generate/olm-catalog/csv_updaters.go#L36 [2] https://github.com/EnMasseProject/enmasse/blob/master/templates/enmasse-operator/050-Deployment-enmasse-operator.yaml#L40

davidffrench avatar May 27 '20 14:05 davidffrench

We don't generate the CSV using operator-sdk at present, but it something we aim to do for 1.0. Likewise, we want to be able to watch only a single namespace in 1.0 as well, so adding the 1.0 milestone to this feature.

lulf avatar May 27 '20 18:05 lulf

Thank you for the response @lulf . That makes sense

davidffrench avatar May 28 '20 12:05 davidffrench