Commit 3805728
authored
fix: pre-pull and cache k3s node image to prevent E2E cluster creation failures (#287)
k3d cluster creation fails intermittently when Docker Hub is slow or
rate-limited because the k3s node image (rancher/k3s) is not pre-pulled
or cached. While cert-manager, Prometheus, stress-ng, and busybox images
are all pre-pulled and cached as tarballs, the k3s image was left to k3d
to pull on the fly during cluster creation.
This caused all 3 retry attempts to fail with 'Client.Timeout exceeded
while awaiting headers' in the nightly E2E run for K8s v1.34
(run 26858361803), while v1.32, v1.33, and v1.35 succeeded on runners
with better connectivity.
Changes:
- Add k3s image to pull_and_save() in both e2e-nightly.yaml and the
setup-e2e-cluster composite action
- Add /tmp/k3s.tar to the actions/cache path and include the k3s
version in the cache key
- Add docker load before k3d cluster create so the image is available
locally regardless of Docker Hub connectivity
- Add retry logic (3 attempts with 10s backoff) to pull_and_save()
for all images, not just k3s
Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>1 parent ec0db8d commit 3805728
2 files changed
Lines changed: 38 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
90 | | - | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
96 | | - | |
97 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
98 | 110 | | |
99 | 111 | | |
100 | 112 | | |
101 | 113 | | |
102 | 114 | | |
103 | 115 | | |
| 116 | + | |
104 | 117 | | |
105 | 118 | | |
106 | 119 | | |
107 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
108 | 124 | | |
109 | 125 | | |
110 | 126 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | | - | |
| 138 | + | |
| 139 | + | |
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
| |||
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
166 | | - | |
| 167 | + | |
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
| 172 | + | |
171 | 173 | | |
172 | 174 | | |
173 | 175 | | |
174 | | - | |
175 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
176 | 186 | | |
177 | 187 | | |
178 | 188 | | |
179 | 189 | | |
180 | 190 | | |
181 | 191 | | |
182 | 192 | | |
| 193 | + | |
183 | 194 | | |
184 | 195 | | |
185 | 196 | | |
186 | 197 | | |
187 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
188 | 202 | | |
189 | 203 | | |
190 | 204 | | |
| |||
0 commit comments