This message was deleted.
# opal
s
This message was deleted.
o
OPA doesn't have any persistance, unless specifically configured via the experimental disk option . Not sure what you are experiencing. Can you share more info? Perhpas you are just seeing OPAL load the data quickly for you after the restart?
b
I just figured it out - it's pulling it from the policy repo! I happened to have a directory named
public
containing files called
data.json
and
huge_data.json
and it's loading the one named
huge_data.json
even though I have no mention of that file in any code.
Copy code
| 15 | opal_client.policy.updater              | INFO  | Got policy bundle with 1 rego files, 1 data files, commit hash: 'f44737210315412e7fc9274e7a52c663afee2e99'
Is this documented behavior?
b
Ooh - and the fact it's loading
huge_data.json
- is there a wildcard like
*data.json
or similar in place?
o
Yes 😇 Below the specific link are env var and manifest configuration instructions to control that, if you want
b
Perfect - for our actual deployment we'll have a repo just for the policy, it's just while testing I happened to have everything in one repo and was very confused when OPA was starting up with a ton of data in it as I'd missed the fact that you could load data from the policy repo not just rego policies. Mystery solved! Thanks for the help 😊
💜 1
r
@Ben Wallis BTW - there is a new persistence feature in opal-client called “Offline Mode”. It loads OPA’s data from backup at start (when running OPA inline). That’s useful for not being dependent on server’s availability on client’s restarts. But it’s off by default. See docs for more details: https://docs.opal.ac/getting-started/running-opal/run-opal-client/opa-runner-parameters#policy-store-backup