canonical / kratos-operator

Charmed Ory Kratos
https://charmhub.io/kratos
Apache License 2.0
4 stars 2 forks source link

Investigate usage of pebble notices for admin UI syncing #262

Open nsklikas opened 2 months ago

nsklikas commented 2 months ago

Enhancement Proposal

When the admin UI makes some change in the configMaps used to create the kratos config, we need to wait for the kratos charm to re-render the config file. This will happen when an event is fired (update-status), the problem is that we can't be sure when that is going to be fired. We need to find a way to make the changes applied faster.

Ideally we should look into using pebble notices. Since we can't trigger a pebble notice from the admin UI app on the kratos charm (need to verify this), we will need to trigger a pebble notice from the admin UI app that will cause the admin UI charm to change something in a relation with the kratos charm which will cause the charm to re-render the config file.

Another approach would be to create a go script (or python), that we would inject in the kratos container. This script would watch for changes in the providers or identity_schemas configmap and it would trigger a pebble notice to notify the charm to re-render the config file. This will save us the trouble of having to use juju integrations, but it is hacky.

As a stopgap solution we can just implement an action in the kratos charm that would re-render the config file and apply it in the kratos container. The admin UI will have to simply show the user a pop-up saying that they should run this action to make kratos peek up the changes.

syncronize-issues-to-jira[bot] commented 2 months ago

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/IAM-1053.

This message was autogenerated

BarcoMasile commented 2 months ago

Might be useful