Ability to pre-pull VM images by targeting workers with labels#379
Ability to pre-pull VM images by targeting workers with labels#379edigaryev wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| // Garbage collect orphaned image pulls | ||
| for _, imagePull := range imagePulls { | ||
| if lo.ContainsBy(imagePull.OwnerReferences, func(ownerReference v1.OwnerReference) bool { | ||
| imagePullJob, ok := imagePullJobIndex[ownerReference.Name] | ||
| if !ok { |
There was a problem hiding this comment.
Manual image pulls garbage-collected immediately
The image pull scheduler only retains pulls whose OwnerReferences match an existing ImagePullJob; everything else in this loop goes down the removal path a few lines below. Manually created pulls (POST /imagepulls) have no owner references, so every scheduler iteration treats them as orphaned and deletes them before workers can process them, breaking the direct image pull flow exercised by TestImagePull.
Useful? React with 👍 / 👎.
In the next PR we can add
schedulefield to theImagePullJoband an OpenAPI documentation.See #352.