Fix build rules for image.mk
Description of your changes
We are not using xpkg instead using the img.mk build rules to package our images. This pr makes the minimal changes to fix the build rules and build multi-arch image using docker manifest command.
Fixes #
I have:
- [x] Read and followed Upbound's contribution process.
- [x] Run
make reviewableto ensure this PR is ready for review. - [x] Added
backport release-x.ylabels to auto-backport this PR, as appropriate.
How has this code been tested
I was able to use my fork to build and publish images
https://github.com/kubeform/provider-gcp/actions/runs/5395921949/jobs/9798952056
Thanks for your contribution. Could you please share a bit more details why manifest-tool got replaced with docker manifest? The later is marked experimental, is there any issues with manifest-tool?
manifest-tool command did not work on Mac M1 laptops. docker manifest command has existed since 2018. I don't know why it is still marked as experimental but this is pretty much what everyone uses these days since it is part of the docker already. You can see the history of the commands here: https://github.com/estesp/manifest-tool#history
Usage in k/k:
https://github.com/kubernetes/kubernetes/blob/master/build/pause/Makefile#L83
Would it be possible to share some more details here @tamalsaha on why manifest-tool didn't work on M1 laptops? What was the error you saw and how can you reproduce it? a lot of us have M1 laptops as well and haven't seen an issue when building ourselves, so understanding the root cause here would be helpful :)
There is no darwin-arm64 version offered by the manifest-tools project. https://github.com/estesp/manifest-tool/releases/tag/v1.0.3
So, curl failed.
Thank you - any further details you can provide about how to reproduce this though? would you be able to fill out details in the "How has this code been tested" section of the PR body?
any further details you can provide about how to reproduce this though?
Just try from any Mac M1 laptop.
How has this code been tested
Done!
Just try from any Mac M1 laptop
Try what exactly? 😇 I'm hoping you can share more precise repro steps here, e.g. the specific commands to run to repro this and where to run them from. Thank you! 🙏