I’m working on configuring a pull-through cache for container images in a Kubernetes environment. My requirement involves dynamically caching images from remote repositories where the repository names are not known in advance. I’d like to use wildcard patterns to match and cache these repositories as they are accessed.
I’ve researched various container registries like Docker Distribution, Harbor, and others, but I’ve noticed that most of them do not support dynamic wildcard configurations for remote repositories.
Here are my specific questions:
-
Is there a way to implement dynamic wildcard support for pull-through caching in a custom setup? For example, can I use a combination of open-source tools or custom scripting to achieve this within Kubernetes or another container runtime environment?
-
Why might dynamic wildcard support not be a common feature in container registries? Is there a fundamental limitation, such as performance, security, or complexity, that prevents this from being widely implemented?
Context:
I’m using Kubernetes with containerd as the runtime. I’m considering building a custom solution if an existing one doesn’t meet the requirements. Any pointers towards specific libraries, tools, or patterns that could help achieve this would be highly appreciated.