zarf icon indicating copy to clipboard operation
zarf copied to clipboard

During `zarf dev find-images` automatically add the digest to any tag to help with pinning resources

Open Racer159 opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe.

As Ezra I want to be able to get the latest digest for a given tag automatically when running zarf dev find-images so that I do not need to manually do this if I want to pin an image to a specific SHA (as zarf dev lint would want me to do)

Describe the solution you'd like

  • Given I have a Zarf package with charts or manifests that need images
  • When I run zarf dev find-images on that package definition
  • Then Zarf will find the image references that it can
  • And Zarf will change any non-SHA-pinned images into a SHA pinned reference when shown to the user.

i.e.

components:
  - name: baseline
    images:
      - defenseunicorns/zarf-game:multi-tile-dark

becomes

components:
  - name: baseline
    images:
      - defenseunicorns/zarf-game:multi-tile-dark@sha256:f78e442f0f3eb3e9459b5ae6b1a8fda62f8dfe818112e7d130a4e8ae72b3cbff

Describe alternatives you've considered

We could do this automatically on create but that may get annoying for people trying to craft a package at a specific version.

Additional context

This should base itself off of the charts and manifests as defined and should not take the existing list of images into account. It should always check the remote registry for the latest manifest SHA at that tag when run. (if the user wishes to hard-pin the image they can edit their values files or manifests to do so)

Racer159 avatar Jan 23 '24 23:01 Racer159

@Racer159 can this be assigned to me ?

waveywaves avatar Feb 21 '24 15:02 waveywaves

Blocked by #2425

Noxsios avatar Apr 09 '24 13:04 Noxsios