MCPcopy Index your code
hub / github.com/estahn/k8s-image-swapper

github.com/estahn/k8s-image-swapper @v1.6.6

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.6.6 ↗ · + Follow
148 symbols 466 edges 22 files 54 documented · 36%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Raiders of the Lost Ark

k8s-image-swapper

Mirror images into your own registry and swap image references automatically.


k8s-image-swapper is a mutating webhook for Kubernetes, downloading images into your own registry and pointing the images to that new location. It is an alternative to a docker pull-through proxy.

Amazon ECR and Google Container Registry are currently supported.

:zap: Benefits

Using k8s-image-swapper will improve the overall availability, reliability, durability and resiliency of your Kubernetes cluster by keeping 3rd-party images mirrored into your own registry.

k8s-image-swapper will transparently consolidate all images into a single registry without the need to adjust manifests therefore reducing the impact of external registry failures, rate limiting, network issues, change or removal of images while reducing data traffic and therefore cost.

TL;DR:

  • Protect against:
  • external registry failure (quay.io outage)
  • image pull rate limiting (docker.io rate limits)
  • accidental image changes
  • removal of images
  • Use in air-gaped environments without the need to change manifests
  • Reduce NAT ingress traffic/cost

:book: Documentation

A comprehensive guide on getting started and a list of configuration options can be found in the documentation.

Documentation

:question: Community

You have questions, need support and or just want to talk about k8s-image-swapper?

Here are ways to get in touch with the community:

Slack channel GitHub Discussions

:heart_decoration: Sponsor

Does your company use k8s-image-swapper? Help keep the project bug-free and feature rich by sponsoring the project.

:office: Commercial Support

Does your company require individual support or addition of features within a guaranteed timeframe? Contact me via email to discuss.

:octocat: Badges

Release Artifact Hub Software License Codecov branch Go Doc

:star2: Stargazers over time

Stargazers over time

Extension points exported contracts — how you extend this code

Client (Interface)
Client provides methods required to be implemented by the various target registry clients, e.g. ECR, Docker, Quay. [2 …
pkg/registry/client.go
ImagePullSecretsProvider (Interface)
(no doc) [2 implementers]
pkg/secrets/provider.go
Option (FuncType)
Option represents an option that can be passed when instantiating the image swapper to customize it
pkg/webhook/image_swapper.go
GARAPI (Interface)
(no doc)
pkg/registry/gar.go

Core symbols most depended-on inside this repo

String
called by 53
pkg/types/types.go
filterMatch
called by 8
pkg/webhook/image_swapper.go
Add
called by 6
pkg/secrets/kubernetes.go
NewDummyECRClient
called by 4
pkg/registry/ecr.go
NewImagePullSecretsResult
called by 4
pkg/secrets/kubernetes.go
NewDummyImagePullSecretsProvider
called by 4
pkg/secrets/dummy.go
Domain
called by 4
pkg/config/config.go
withDeadline
called by 4
pkg/webhook/image_copier.go

Shape

Function 57
Method 57
Struct 27
Interface 3
TypeAlias 3
FuncType 1

Languages

Go100%

Modules by API surface

pkg/webhook/image_swapper.go18 symbols
pkg/registry/gar.go16 symbols
pkg/registry/ecr.go16 symbols
pkg/config/config.go15 symbols
pkg/registry/client.go14 symbols
pkg/types/types.go9 symbols
pkg/secrets/kubernetes.go9 symbols
pkg/webhook/image_swapper_test.go8 symbols
pkg/webhook/image_copier.go8 symbols
cmd/root.go5 symbols
test/e2e_test.go4 symbols
pkg/secrets/dummy.go4 symbols

For agents

$ claude mcp add k8s-image-swapper \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact