Open jordanrinke opened 4 years ago
Currently we only have very simple matching and modification rules in dfdaemon, which can modify the protocol (http or https) and host. Will this meet your need?
proxies:
# redirect all image layer requests to host registry-cache
- regx: blobs/sha256.*
# hostname to redirect to
redirect: registry-cache
Sorry that the redirect
field seems to be missing from the docs for now. We'll fix that soon.
This may work, I will read the code and test with it. Thanks.
Why you need it?
We have multiple transparent docker proxy caches internal to our network, but they are potentially different based on the site, provider etc. It would be useful if we could add a regex rewrite rule to transparently point to our local caches for draongfly, it would reduce our WAN traffic, and maximize our LCR choices while maintaining standard image paths/names in the manifests applied across all clusters. We use squid+https://github.com/rchunping/squid-urlrewrite to do this now, sitting in front of the supernode. If dfdaemon did the rewriting, we could eliminate squid/rewriting entirely and leverage just dragonfly.
How it could be?
Additional config in yaml to specify a url match pattern, and replace pattern. The format used in squid-urlrewrite works well for us currently.
Other related information