Skip to content

Add Image Preflight Check and Pull Before Reconcile #8

@andreamancuso

Description

@andreamancuso

Before attempting to start containers during reconciliation, rezn should ensure all referenced images are available locally. If any image is missing, it should be pulled before container startup begins.

Why
When an image is not present locally, docker run will trigger an implicit pull - this can stall container startup by 30s–90s+ depending on network and image size. Preflight checking avoids confusion, improves logs, and allows for better control and feedback to the user.

What to do

  • Extract image names from PodSpecs during reconcile
  • Add docker image inspect check per image
  • If image is not found, run docker pull before attempting to start any container
  • Log each pull operation (start + success/failure)
  • Only proceed with container startup after all required images are present

Future consideration

  • Cache previously pulled images to avoid redundant inspect checks
  • Optionally allow parallel pulls for large-scale deploys

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions