Skip to content
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

Docker API Rate Limit #456

Closed
antwacky opened this issue Feb 15, 2024 · 5 comments
Closed

Docker API Rate Limit #456

antwacky opened this issue Feb 15, 2024 · 5 comments

Comments

@antwacky
Copy link
Contributor

Does anyone know if the KBLD queries count towards the Docker API rate limit? It does seem to.

Which brings me to my next question, does KBLD have a way to use a registry mirror? We have registry mirrors set up in our Docker daemon config to avoid hitting rate limits when pulling images and in order to use KBLD - we would need a way to make KBLD use/respect configured registry mirrors.

@antwacky antwacky added the carvel triage This issue has not yet been reviewed for validity label Feb 15, 2024
@antwacky
Copy link
Contributor Author

Reading the Dockerhub API rate limiting doc, it seems that two GET requests count as a pull.

Does KBLD use a HEAD instead which is not rate limited?

@joaopapereira
Copy link
Member

By default, kbld uses GET, not HEAD.
In the current implementation, there is no way to automatically have a mirror registry for DockerHub. You could accomplish that at the OS level by setting the host file or something similar.

kbld could eventually be enhanced to support some Environment variable that would do this for you.

@antwacky
Copy link
Contributor Author

I've raised a pull request to change the method from GET to HEAD.

I've tested and can see the DockerHub ratelimit-remaining being reduced after using the current version, and unaffected using the pull request fork.

@antwacky
Copy link
Contributor Author

@joaopapereira do you think someone could review my pull request? We will struggle to adopt kbld with the current implementation draining the dockerhub rate limit.

@joaopapereira
Copy link
Member

Sorry for the delay but I was out for a couple of days, I left a review in the PR

@github-project-automation github-project-automation bot moved this to Closed in Carvel Feb 22, 2024
@github-actions github-actions bot removed the carvel triage This issue has not yet been reviewed for validity label Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants