Andrea Di Saverio
11/18/2025, 4:01 PMAsk Inkeep
11/18/2025, 4:01 PMAsk Inkeep
11/18/2025, 4:01 PMpolicy: False in the health check, the bottleneck appears to be in the policy loading phase (1) .
Here are some configuration options to help improve the startup time:
1. *Adjust the Git clone timeout*: You can set OPAL_POLICY_REPO_CLONE_TIMEOUT to control how long OPAL waits for the Git clone operation . The default is 0 (waits indefinitely) , but you might want to set a specific timeout to identify if cloning is the issue.
2. *Enable repository reuse*: Set OPAL_POLICY_REPO_REUSE_CLONE_PATH=True to reuse an existing clone instead of creating a new one on each startup . This can significantly reduce startup time if the pod restarts frequently.
3. *Configure worker count*: Adjust OPAL_FETCHING_WORKER_COUNT (default is 6) to increase parallel fetching of policies .
4. *Use policy bundles*: Consider using the API bundle approach instead of Git by setting OPAL_POLICY_SOURCE_TYPE=API and configuring OPAL_POLICY_BUNDLE_URL . This can be faster for large policy sets as it downloads a pre-packaged bundle rather than cloning a repository.
5. *Filter unnecessary files*: Use OPAL_FILTER_FILE_EXTENSIONS to only process relevant policy files (default is [".rego", ".json"]) . Also, you can use OPAL_BUNDLE_IGNORE to exclude specific paths from being processed .
6. *Check retry settings*: Review OPAL_POLICY_UPDATER_CONN_RETRY configuration which controls retry behavior when connecting to the policy source .
The architecture shows that OPAL Client fetches policies from the OPAL Server, which in turn retrieves them from your Git repository (2) . With 480 policies, the initial synchronization can indeed take time, especially if each policy needs to be individually processed.
For immediate troubleshooting, you might want to enable more detailed logging with OPAL_LOG_LEVEL=DEBUG to see exactly where the time is being spent (1) .Ask Inkeep
11/18/2025, 4:02 PMOr Weis
11/18/2025, 4:16 PMAndrea Di Saverio
11/18/2025, 4:18 PMAndrea Di Saverio
11/18/2025, 4:26 PMOr Weis
11/18/2025, 4:36 PM