-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for offline recovery by saving and reading bundles from disk #2097
Comments
For server mode, I see that if I put new rego policy or data into OPA daemon via RESTful API, the policy and data won't be saved to disk, this also means the policy and data will be lost once I restart the OPA server. Do you have plan to fix this too? |
@WeiZhang555 we don't have any immediate plans to add support for persistence in OPA itself. If you build OPA from source, you can replace the in-memory store with your own implementation. |
This commit adds support to persist and load bundles from disk. A new field is introduced in OPA's bundle configuration that can be optionally set to enable OPA to write and read bundles from disk. This feature will allow OPA to serve policy decisions in scenarios such as OPA being unable to communicate with the bundle server. Fixes open-policy-agent#2097 Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
This commit adds support to persist and load bundles from disk. A new field is introduced in OPA's bundle configuration that can be optionally set to enable OPA to write and read bundles from disk. This feature will allow OPA to serve policy decisions in scenarios such as OPA being unable to communicate with the bundle server. Fixes #2097 Signed-off-by: Ashutosh Narkar <anarkar4387@gmail.com>
OPA does not currently save downloaded bundles to disk. This means that if OPA restarts and is unable to connect to a bundle server it will be unable to serve policy decisions until the bundle server is reachable.
To better support offline recovery, OPA could be extended to save activated bundles to disk. If OPA restarts after saving a bundle to disk it can read the bundle from disk and use it until it's able to download the latest version from the bundle server.
Misc. thoughts:
The text was updated successfully, but these errors were encountered: