[feature] Template option for displaying manifest before sync #307
Description
When using hauler store sync --products...
it can potentially download in excess of 40gb of data. Having a template function to show the manifest BEFORE actually downloading would allow teams to choose, check in to version control, and compare image lists they may already have.
Describe Proposed Solution(s):
create a flag --create-manifest
for exporting the manifest yaml. Either to stdout or to a file.
hauler store sync --products rancher=2.8.6 --create-manifest
This will give teams the ability to review what images are being pulled. Check the manifest into version control. And potentially trim down the manifest to remove images that are not needed. aka removing longhorn, neuvector, isitio and the likes.
as an example
curl -sL https://github.com/rancher/rancher/releases/download/$RANCHER_VERSION/rancher-images.txt -o hauler_temp/orig-rancher-images.txt
sed -E '/neuvector|minio|gke|aks|eks|sriov|harvester|mirrored|longhorn|thanos|tekton|istio|hyper|jenkins|windows/d' hauler_temp/orig-rancher-images.txt > hauler_temp/cleaned-rancher-images.txt
# capi fixes
grep cluster-api hauler_temp/orig-rancher-images.txt >> hauler_temp/cleaned-rancher-images.txt
grep kubectl hauler_temp/orig-rancher-images.txt >> hauler_temp/cleaned-rancher-images.txt
# get latest version
for i in $(cat hauler_temp/cleaned-rancher-images.txt|awk -F: '{print $1}'); do
grep -w "$i" hauler_temp/cleaned-rancher-images.txt | sort -Vr| head -1 >> hauler_temp/rancher-unsorted.txt
done
Describe Possible Alternatives:
current alternative is
hauler store add image rgcrprod.azurecr.us/hauler/rancher-manifest.yaml:v2.8.5
hauler store extract hauler/rancher-manifest.yaml:v2.8.5
which actually starts to download before creating the local manifest.
Additional Context:
Metadata
Assignees
Labels
Type
Projects
Status
Backlog