Is your feature request related to a problem? Please describe.
When you run zarf dev find-images, it doesn't take into account that some images might be from image archives. For instance, if zarf dev find-images is run on the examples/kiwix package, then a user will receive the following output:
components:
- name: kiwix-serve
images:
- ghcr.io/kiwix/kiwix-serve:3.5.0-2
- kiwix-data:local
However, given that there is an image archive, if you were to copy the images block into your component, or if you were to run zarf dev find-images --update, you would place images into your images block, that you were already bringing in through your image archive block.
Instead, zarf dev find-images should have knowledge of which images are in an archive defined in the package. If an image is found in a manifest that's within an image archive, instead of outputting the image in the images block, it should be outputted in the image archive block like so:
components:
- name: kiwix-serve
images:
- ghcr.io/kiwix/kiwix-serve:3.5.0-2
imageArchives:
- path: kiwix-data.tar
images:
- kiwix-data:local
Notably, we should not include all images in the image archives block unless they are in a manifest
This should also work for zarf dev find-images --update.
Describe alternatives you've considered
Initially I created the issue #4509, however I realized that the strategy in this issue didn't fit well with the zarf dev find-images command. Given that it looks for images through manifests, flags like --why and --update didn't fit well with the proposed behavior in that issue
Is your feature request related to a problem? Please describe.
When you run
zarf dev find-images, it doesn't take into account that some images might be from image archives. For instance, ifzarf dev find-imagesis run on the examples/kiwix package, then a user will receive the following output:components: - name: kiwix-serve images: - ghcr.io/kiwix/kiwix-serve:3.5.0-2 - kiwix-data:localHowever, given that there is an image archive, if you were to copy the images block into your component, or if you were to run
zarf dev find-images --update, you would place images into your images block, that you were already bringing in through your image archive block.Instead,
zarf dev find-imagesshould have knowledge of which images are in an archive defined in the package. If an image is found in a manifest that's within an image archive, instead of outputting the image in the images block, it should be outputted in the image archive block like so:components: - name: kiwix-serve images: - ghcr.io/kiwix/kiwix-serve:3.5.0-2 imageArchives: - path: kiwix-data.tar images: - kiwix-data:localNotably, we should not include all images in the image archives block unless they are in a manifest
This should also work for
zarf dev find-images --update.Describe alternatives you've considered
Initially I created the issue #4509, however I realized that the strategy in this issue didn't fit well with the
zarf dev find-imagescommand. Given that it looks for images through manifests, flags like--whyand--updatedidn't fit well with the proposed behavior in that issue