Open davidffrench opened 4 years ago
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.
Thank you for the response @lulf . That makes sense
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