Skip to content

Commit 5d25211

Browse files
ci(e2e): preload Calico images into kind through the runner mirror (#5178)
* ci(e2e): preload Calico images into kind through the runner mirror The app-listener lanes install Calico into kind. The kind node's containerd pulled the Calico images from Docker Hub anonymously and hit 429 Too Many Requests, failing all four lanes in kind setup. Pull the images on the host instead, where the runner's Docker daemon uses the nv-gha-runners Docker Hub mirror, and load them into kind before applying the manifest. The image list comes from the manifest, so a Calico upgrade cannot add an image that bypasses the preload. Signed-off-by: Matthew Grossman <[email protected]> * ci(e2e): preload a fixed list of Calico images Name the three Calico images instead of extracting them from the manifest, and define the Calico version once for both the manifest URL and the image tags. Signed-off-by: Matthew Grossman <[email protected]> --------- Signed-off-by: Matthew Grossman <[email protected]>
1 parent cc0642f commit 5d25211

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

‎.github/actions/setup-e2e-kind/action.yml‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ runs:
7878
shell: bash
7979
env:
8080
CLUSTER_NAME: ${{ inputs.cluster-name }}
81+
CALICO_VERSION: v3.30.3
8182
run: |
8283
set -euo pipefail
8384
collect_cni_diagnostics() {
@@ -98,9 +99,18 @@ runs:
9899
exit "$failure_status"
99100
}
100101
trap collect_cni_diagnostics ERR
101-
curl -fsSL https://raw.githubusercontent.com/projectcalico/calico/v3.30.3/manifests/calico.yaml \
102+
curl -fsSL "https://raw.githubusercontent.com/projectcalico/calico/$CALICO_VERSION/manifests/calico.yaml" \
102103
-o "$RUNNER_TEMP/calico.yaml"
103104
sed '[email protected]/[email protected]/16@g' "$RUNNER_TEMP/calico.yaml" > "$RUNNER_TEMP/calico-kind.yaml"
105+
# The kind node's containerd pulls Docker Hub anonymously and is rate
106+
# limited. The host daemon pulls through the runner's registry mirror.
107+
for component in cni node kube-controllers; do
108+
image="docker.io/calico/$component:$CALICO_VERSION"
109+
archive="$RUNNER_TEMP/calico-$component-linux-amd64.tar"
110+
docker pull --platform linux/amd64 "$image"
111+
docker image save --platform linux/amd64 --output "$archive" "$image"
112+
kind load image-archive "$archive" --name "$CLUSTER_NAME"
113+
done
104114
kubectl --context "kind-$CLUSTER_NAME" apply -f "$RUNNER_TEMP/calico-kind.yaml"
105115
kubectl --context "kind-$CLUSTER_NAME" -n kube-system rollout status daemonset/calico-node --timeout=300s
106116
kubectl --context "kind-$CLUSTER_NAME" -n kube-system rollout status deployment/calico-kube-controllers --timeout=300s

0 commit comments

Comments
 (0)