Sign inSign up

gounix/docker-rate-limit

By gounix

•Updated 3 months ago

Make your Docker rate limit available to Prometheus.

Image
Developer tools
Monitoring & observability
0

810

gounix/docker-rate-limit repository overview

⁠Overview

The docker-rate-limit container queries the current rate limit settings at docker.io for an anonymous connection. Limits for authenticated users are supported in the 1.1 release. The values are made available for scraping by prometheus. The scrape url is http://<service_address>:<PORT_NUMBER>/metrics. If you use the prometheus-operator deployment in combination with our helm chart the scrape config is not needed. The helm chart contains a serviceMonitor definition.

⁠Screenshot

Grafana

⁠Environment variables

The following enviroment variables are supported:

VariableDescription
REFRESH_SECONDSThe amount of seconds between successive polls of docker.io
PORT_NUMBERThe port that is used for publishing the metrics
IMAGEPULL_SECRETThe name of the pull secret
NAMESPACEThe namespace where the secret can be found (the namespace of this deployment)
HTTPS_PROXYThe optional proxy server to use (example http://proxy.example.com:8080⁠)

⁠Working with authenticated limits

When querying authenticated limits an additional secret has to be created in the following way:

kubectl create secret docker-registry regcred -n docker-rate-limit --docker-server="https://index.docker.io/v1/" --docker-username="me" --docker-password="my passwd" --docker-email="[email protected]"

This secret has to be created in the namespace of the docker-rate-limit.

⁠Available metrics

There are two metrics available, ratelimit_limit and ratelimit_remaining, both have a label account that is set to the ccount that is set in the IMAGEPULL_SECRET. When using an anonymous connection account is set to your ip address.

⁠Helm chart

github⁠

⁠Sources

github⁠

Tag summary

Content type

Image

Digest

sha256:46f7b0407…

Size

85.1 MB

Last updated

3 months ago

docker pull gounix/docker-rate-limit:1.2.1