-
Notifications
You must be signed in to change notification settings - Fork 14
Reconcile Backstage when ConfigMap/Secret configuration changed #236
Comments
Seems related to #74? |
Performance impact should be considered and tested due to watching of the configmaps/secrets. |
This can be used to detect the change and restart - https://github.com/stakater/Reloader |
I'd re-evaluate the need for this issue to be solved: Restarting Backstage pod isn't done quickly. It takes several minutes till the pod is restarted and this time increases as a direct dependency on the amount of enabled plugins. However, I'd expect a deployment restart to work, while I checked this locally, and reported #281 for this. |
@masayag that is a good point. While I predict in most of the cases auto-restart would be prefferable, in some cases manual restart would be better by the reasons you mentioned. And I am actually thinking about additional setting for operator, something like: WDYT? |
Allowing the admin to decide which method to use is a good option, +1 for |
I think so, the idea is to have dedicated label per ConfigMap and make controller watch it and reconcile CR when associated CM changed. |
We had some issues with secrest/configmaps being continually written, updated by something in some of our environments and it led to the operator reconciling far more often than it needed to. We solved this by having an internal cache of hashes of configmaps that we cared about. That way we could filter events and only reconcile if we actually needed to. |
@psav what exactly was updated by something else? Some metainfo? |
Sometimes it was another operator going wrong etc |
Notes for design documentations: Operator will recreate the Backstage Pod if new and old hash values of watched ConfigMaps/Secrets's data field is not equal.
In principle User is able to change it individually making Config Resource not watchable by setting rhdh.redhat.com/config-sync=false, even if there are no visible reasons why with exception of (more likely Cluster scoped) Security consideration below. Security consideration: Backstage configuration pattern: |
@masayag current implementation is based on CM/Secret label/annotation so in principle it can be very atomic. |
Need to make Backstage application automatically reload (which means BS container restart) if specified (in spec.Application) configuration changed.
Liiks like we need to:
The text was updated successfully, but these errors were encountered: