-
Notifications
You must be signed in to change notification settings - Fork 132
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
Rate limiting: Use conditional requests for GitHub commit status updates #977
Comments
Do I understand correct that you have set Which request exactly is rate-limited by GitHub for you? |
Ah sorry, should've attached an error message. See this:
I think this is because the code tries to list commit statuses to decide whether to send an update or not. |
I know you said you'd like to keep it that way but I wonder why, because dialing that up would be the easiest fix. The interval on Kustomization mainly serves to rollback manual changes to the resources. If you have a reasonably low interval on the sources, changes to those will also trigger reconciliations of all Kustomizations. |
We're keeping it that low to make sure our Kustomizations are deployed early. But I think this might have been a misconception on our side - it looks like we should keep the GitRepository's As in:
|
Exactly. I usually set the Kustomization interval to 1 hour on my clusters to keep the noise low. |
OK, great! We'll change our setup accordingly, thank you! |
We use notification-controller to update our GitHub repos' commit statuses. Since there are a couple of hundred of those repositories and we reconcile our Kustomizations quite often, we get rate limited by GitHub.
Since we'd like to keep our short reconciliation interval I'm proposing to implement conditional requests for requests made to GitHub by the notification-controller.
All that's required for that is to save the value of the
etag
header from the last request made to a repository and then add its value to a new headerif-none-match
on the next request.Happy to share any additional info you need or help with the implementation if I can, please just ping me - thanks!
The text was updated successfully, but these errors were encountered: