-
Notifications
You must be signed in to change notification settings - Fork 591
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
Race condition between secret reconciler and object reference index #5175
Comments
I checked the code, When the |
Hey @randmonkey - the main unexpected behavior we observe is consistent with the credentials being loaded - namely that our ACL plugin is blocking requests for ~5-10 minutes after startup due to the credential presented not being found. |
Going to close this until I can provide more debug info |
hi @randmonkey - did some further digging here and the behavior I generally can reproduce is:
The second update to the admin api happens a few seconds later from the logs we put in place, but for the few seconds between the first and second writes, we have an effectively 'broken' configuration. |
This seems fixable by #2249 - maybe the best intermediate solve here is to allow InitCacheSyncDuration to be configurable instead of just hard coded to 5s |
Ah - I think there was a regression to the #2249 fix here. In #4101, InitCacheSyncDuration started being passed in when the synchronizer is created, but InitCacheSyncDuration is not being initialized to anything while previously DefaultCacheSyncWaitDuration in synchronizer.go was being initialized to 5 seconds |
Is there an existing issue for this?
Current Behavior
We recently noticed similar errors to #4672 where our secrets were getting "Not Found" errors despite very much existing and being referenced by KongConsumer via
credentials
. After checking our CRDs as mentioned in that issue, we added some custom logging to understand why our secrets were not getting populated into the cache. The custom logging revealed that the controller for Secrets was evaluating reference checks before the controller for KongConsumer had reconciled the consumers and populated the references, resulting in 0 secrets being reconciled.Expected Behavior
All initial resources should be loaded before calculating references.
Steps To Reproduce
No response
Kong Ingress Controller version
Kubernetes version
Anything else?
Similer to #4672
The text was updated successfully, but these errors were encountered: