canonical / data-platform-libs

A collection of charm libraries curated by the Data Platform Team
https://charmhub.io/data-platform-libs
Apache License 2.0
9 stars 9 forks source link

[DPE-2342] Charm Relation (i.e. 'external') Secrets #91

Open juditnovak opened 11 months ago

juditnovak commented 11 months ago

Disclaimer

Here we introduce Relations Secrets on top of the existing data_interfaces logic.

New interfaces:

POC demo of usage demonstrated on Opensearch: https://github.com/canonical/opensearch-operator/pull/116

juditnovak commented 11 months ago

@shayancanonical

SecretCache: Your point is valid, it is

  1. An abstraction layer to handle direct interaction with the Juju Secret Strore
  2. However it IS a cache too :-)

    The point is that, once you fetch a secret via a SecretCache object, it won't be fetched again within the same event scope. So it's kinda providing a smart layer between DataInterfaces and Juju. It's both handling the interactions AND if the interaction is avoidable it would just return the previously cached data.

    (I may need to polish up a code, there could be errors on this still :-) )