Local OPA Bundle File #350
-
Hi, According to https://www.openpolicyagent.org/docs/latest/cli/#opa-run, OPA supports to load bundle from a compressed file or directory. When the policy or data files are updated in these local directory or compressed file, are they loaded on the fly without requiring a restart of OPA? The bundle document 'https://www.openpolicyagent.org/docs/latest/management-bundles/' says 'OPA can periodically download bundles of policy and data from remote HTTP servers. The policies and data are loaded on the fly without requiring a restart of OPA'. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @Ronnie-personal 👋 That's correct. For any real deployment scenario, you'll almost always want the bundles to be provided by a remote server rather than from a local disk. If you want to run the OPA server and have it listen for file updates, you can do so with the |
Beta Was this translation helpful? Give feedback.
Hi @Ronnie-personal 👋 That's correct. For any real deployment scenario, you'll almost always want the bundles to be provided by a remote server rather than from a local disk. If you want to run the OPA server and have it listen for file updates, you can do so with the
--watch
flag. I'm not sure if it works with bundles (but please do try!), but it works with policy and data in directories. Note that this mode is not meant for production use, but can occasionally be useful for development.