Commit 2492a30
committed
feat(webapp): apply default repository policy on ECR repo creation
Self-hosters that run the webapp's ECR account separately from their EKS
worker account hit a 403 Forbidden on every new project's first run:
`ensureEcrRepositoryExists` calls CreateRepository but never sets a
repository policy, so kubelet can't pull the runner image cross-account.
Add an optional `DEPLOY_REGISTRY_ECR_DEFAULT_REPOSITORY_POLICY` env
var (raw IAM policy JSON, V4 mirror as well). When set, the webapp
calls SetRepositoryPolicy after CreateRepository, baking the operator's
cross-account pull rule into every new repo automatically.
Existing repos are unaffected — they keep their current policy.
Cloud is unaffected — the env var is optional and unset by default.
Verified locally against a self-host on EKS with cross-account ECR:
without the policy, runners stayed in ImagePullBackOff with 403; with
it, the same flow completes a hello-world run end-to-end in ~5s.1 parent 1a7943c commit 2492a30
4 files changed
Lines changed: 37 additions & 1 deletion
File tree
- apps/webapp/app
- v3
- docs/self-hosting/env
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
| 303 | + | |
303 | 304 | | |
304 | 305 | | |
305 | 306 | | |
| |||
332 | 333 | | |
333 | 334 | | |
334 | 335 | | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
335 | 340 | | |
336 | 341 | | |
337 | 342 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
| 142 | + | |
141 | 143 | | |
142 | 144 | | |
143 | 145 | | |
| |||
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
| 224 | + | |
222 | 225 | | |
223 | 226 | | |
224 | 227 | | |
225 | 228 | | |
226 | 229 | | |
227 | 230 | | |
| 231 | + | |
228 | 232 | | |
229 | 233 | | |
230 | 234 | | |
| |||
262 | 266 | | |
263 | 267 | | |
264 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
265 | 283 | | |
266 | 284 | | |
267 | 285 | | |
| |||
386 | 404 | | |
387 | 405 | | |
388 | 406 | | |
| 407 | + | |
389 | 408 | | |
390 | 409 | | |
391 | 410 | | |
392 | 411 | | |
393 | 412 | | |
| 413 | + | |
394 | 414 | | |
395 | 415 | | |
396 | 416 | | |
| |||
428 | 448 | | |
429 | 449 | | |
430 | 450 | | |
431 | | - | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
432 | 459 | | |
433 | 460 | | |
434 | 461 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| 36 | + | |
34 | 37 | | |
35 | 38 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| |||
0 commit comments