external-dns
external-dns copied to clipboard
use docker buildx for multi-arch docker image
Description
Before this change, docker image is built with the arch the same as host node even after ARCH is specified. Using docker buildx helps us build cross-platform multi-arch docker images
Fixes #ISSUE
Checklist
- [ ] Unit tests updated
- [ ] End user documentation updated
Welcome @mainred!
It looks like this is your first PR to kubernetes-sigs/external-dns 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.
You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.
You can also check if kubernetes-sigs/external-dns has its own contribution guidelines.
You may want to refer to our testing guide if you run into trouble with your tests not passing.
If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!
Thank you, and welcome to Kubernetes. :smiley:
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: mainred
To complete the pull request process, please assign njuettner after the PR has been reviewed.
You can assign the PR to them by writing /assign @njuettner in a comment when ready.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
take an arm64 image push for example.
➜ external-dns git:(docker-buildx-for-multi-arch) IMAGE=qingchuanhao.azurecr.io/external-dns/external-dns ARCH=arm64 make build.push
➜ external-dns git:(docker-buildx-for-multi-arch) docker manifest inspect qingchuanhao.azurecr.io/external-dns/external-dns:external-dns-helm-chart-1.3.2-17-g4bac670e-dirty-arm64 --verbose
{
"Ref": "qingchuanhao.azurecr.io/external-dns/external-dns:external-dns-helm-chart-1.3.2-17-g4bac670e-dirty-arm64",
"Descriptor": {
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"digest": "sha256:4d249e558feeecb49cc8404c6fa8a6e5c189f49d183ac4f9d90a1d52853c4801",
"size": 1160,
"platform": {
"architecture": "arm64",
"os": "linux"
}
},
"SchemaV2Manifest": {
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"schemaVersion": 2,
"config": {
"mediaType": "application/vnd.docker.container.image.v1+json",
"digest": "sha256:bbeba1d79c3c0f563bcfc893b0f1753533306e79a6d164101081f2d61c0e5cf4",
"size": 1630
},
"layers": [
{
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
"digest": "sha256:552d1f2373af9bfe12033568ebbfb0ccbb0de11279f9a415a29207e264d7f4d9",
"size": 2711827
},
{
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
"digest": "sha256:887eec468cf81302a3b6351610d27415b4033d8eb1cb47c5e7df336df81e86b9",
"size": 405592
},
{
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
"digest": "sha256:84849f92a532aa27ad22d9ee3f9eb9bbaa714a7d96d4291186ae5560cec5390b",
"size": 115250
},
{
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
"digest": "sha256:410340719201ec8a952356b6f6f7accb53403c37d3df99599da87033f180ad09",
"size": 17087535
}
]
}
}
ARCH=arm64 make build.docker returns the following error, which should have been fixed in https://github.com/golang/go/commit/f84d28b7755f256efda7830a3b78b46464497527 by ignoring the error unsupported VMA range
#16 1432.7 FATAL: ThreadSanitizer: unsupported VMA range
#16 1432.7 FATAL: Found 39 - Supported 48
ping @Raffo @RaffoRaffo, PTAL, thanks.
@mainred I’m going to take a look at this, I will have to try it on a machine to test it out. Do you think this will also bring performance improvements? Building images for all the archs in the way we are doing it today takes forever and prow doesn’t allow us to do much better from what I know.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale - Mark this issue or PR as rotten with
/lifecycle rotten - Close this issue or PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle rotten - Close this issue or PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the PR is closed
You can:
- Reopen this PR with
/reopen - Mark this PR as fresh with
/remove-lifecycle rotten - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close
@k8s-triage-robot: Closed this PR.
In response to this:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied- After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied- After 30d of inactivity since
lifecycle/rottenwas applied, the PR is closedYou can:
- Reopen this PR with
/reopen- Mark this PR as fresh with
/remove-lifecycle rotten- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
- :x: The commit (3851c3aea7b1d7a557f6d34d9b70ac2d110304bc). This user is missing the User's ID, preventing the EasyCLA check. Consult GitHub Help to resolve.For further assistance with EasyCLA, please submit a support request ticket.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: mainred Once this PR has been reviewed and has the lgtm label, please assign njuettner for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
PR needs rebase.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
I am resurrecting this PR because we really needed. Given the time that has passed, I will likely just copy the content in my own PR to get it merged. I want to still spend time to thank the author @mainred for the original contribution.