open-policy-agent / gatekeeper

🐊 Gatekeeper - Policy Controller for Kubernetes
https://open-policy-agent.github.io/gatekeeper/
Apache License 2.0
3.72k stars 765 forks source link

feat: Add retry limit when fetching/listing expectations in ready tracker #3460

Open David-Jaeyoon-Lee opened 4 months ago

David-Jaeyoon-Lee commented 4 months ago

Describe the solution you'd like In order for #3308 to take affect, we need to add support for users to set a retry limit when fetching expectations. This involves creating a retryPredicate that sets the number of retries based on a user defined limit/count. Currently since the retryPredicate always retries, the crashOnFailureFetchingExpectations is moot and hidden (replaced with a constant false value).

Anything else you would like to add: In addition to adding support for retry limit, once this is implemented, we need to expose the crashOnFailureFetchingExpectations flag back to the user (delete constant false value and uncomment crashOnFailureFetchingExpectations flag) as well as change any logic that uses that flag as a constant (likely need to dereference the variable)

ritazh commented 4 months ago

xref: https://github.com/open-policy-agent/gatekeeper/pull/3453#discussion_r1686974343

stale[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.