kuma: preload Docker Hub images in E2E to avoid slow pulls - #24939
Draft
nubtron wants to merge 1 commit into
Draft
kuma: preload Docker Hub images in E2E to avoid slow pulls#24939nubtron wants to merge 1 commit into
nubtron wants to merge 1 commit into
Conversation
|
evalya-impact-summaryevalya impact analysis |
nubtron
force-pushed
the
nubtron/kuma-e2e-preload-images
branch
from
August 21, 2026 10:10
a18136b to
ef84887
Compare
Contributor
Validation Report
Run Passed validations (20)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Speeds up the kuma E2E test on slow/constrained connections by preloading the Docker Hub images the Helm chart pulls, so the kind nodes don't have to fetch them from
docker.io(slow / rate-limited) at install time.Motivation
The kuma E2E test (
kuma/tests/conftest.py) installs Kuma viahelm upgrade --install kuma kuma/kuma. On a fresh install the chart pulls three images:docker.io/kumahq/kuma-cp:<version>— control-plane deployment (~31 MB)docker.io/kumahq/kumactl:<version>— CRD-install hook job (~42 MB)registry.k8s.io/kubectl:v1.32.8@sha256:...— hook job (~30 MB)The two
kumahq/*images come from Docker Hub, which is the slow / rate-limited step on constrained connections (the chart tarball itself is only ~77 KB, so vendoring the chart would not help). Thekubectlimage comes fromregistry.k8s.io, which is fast and reliable, so it is left to pull normally.The host's Docker image store is persistent across the disposable kind clusters, so
docker pullis a cache hit from the second run onward — only the first run pays the download, and every subsequent run is hermetic.Changes
kumahq/kuma-cpandkumahq/kumactlon the host (single platform) before the cluster is created (akind_runwrapper, mirroringvelero/tests/conftest.py).conditionthat runs beforesetup_kuma, so they are present in the nodes beforehelm install.imagePullPolicychange needed: the chart already defaults toIfNotPresentfor the control plane, and the hook jobs use non-:latesttags (which default toIfNotPresent), so the side-loaded copies are used.Why not
datadog_checks.dev.kind.KindLoad?KindLoaduseskind load docker-image, which pipesdocker saveintoctr images import --all-platformsinside the node. On Docker daemons using the containerd image store (features.containerd-snapshotter: true, the default on recent Docker / what CI uses),docker saveof a multi-arch image emits an OCI index referencing blobs for every platform — including non-host-platform blobs that were never downloaded.kind load docker-imagethen fails with:veleroavoids this only because itdocker builds a single-platform image. For upstream multi-arch images we instead usedocker save --platform <os/arch>+kind load image-archive, which saves only the host-platform blobs and keeps the original image name so the chart's image references resolve to the side-loaded copies. Verified locally against a containerd-image-store Docker daemon wherekind load docker-imagereproduces the error above and the archive flow succeeds.Testing
python -m py_compile kuma/tests/conftest.py✅ddev test kuma -- -m "not e2e"→ 27 passed ✅kind load docker-imagefailure on a containerd-store daemon, then confirmeddocker save --platform+kind load image-archiveloads bothkumahq/kuma-cp:2.10.6andkumahq/kumactl:2.10.6into a fresh kind cluster under their original names ✅Notes
kubectlhook image is intentionally not preloaded: it is digest-pinned (awkward to side-load) and served from the fastregistry.k8s.io. If full hermeticity is later desired, it could be added to_kuma_images().