The airgap script used to work with the Mike Farah's yq.
Anyway, it was incompatible with the Andrey Kislyuk's yq version (which
is the main python3 version you would get via pip).
Drop the eval arg from yq in the airgap script to make it compatible
with both.
Also check the yaml keys are there before trying recursion (which would
led to error out with some yq parsers)
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
channel.image expects a full image url, including the registry, while
channel.repository expects the repository url stripped of the registry.
Manage it correctly when printing the next steps.
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
* scripts/elemental-airgap.sh: sort options in alphabetical order
* scripts/elemental-airgap.sh: add Hauler support
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
...and also to skip archive creation.
This way the script should be ready for usage for the airgap scenario
with the chart in the Rancher Marketplace and could allow more custom
airgap setup where the images downloaded are pushed to the registry
in a different way, without passing through a tar.gz
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
when building the local channel image, if no name is provided, an
automatic one is created using the local registry name.
Drop the ':' from the registry name if present, otherwise docker tagging
will fail with an error.
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
Allow to extract and download the OS images specified in the channel
image shipped with the Elemental Operator chart.
Build a new channel image targeting the local registry of the airgapped
scenario (which is now a mandatory option).
Fixes https://github.com/rancher/elemental/issues/950
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>
It will allow to automatically pick the right repos for both the
elemental-operator chart and the crds chart.
Minor improvements (overwrite image list txt file and add a couple of
usage examples in the help).
pick the chart as a mandatory argument.
If the argument is a path, download the chart. Otherwise consider it an
already downloaded file.
Signed-off-by: Francesco Giudici <francesco.giudici@suse.com>