kubernetes-csi / csi-release-tools

shared build and test files used by kubernetes-csi projects
Apache License 2.0
21 stars 71 forks source link

Unable to create an arm/v7 docker image with `make push-multiarch` #180

Closed mauriciopoppe closed 2 years ago

mauriciopoppe commented 2 years ago

We use this env var to build the images:

# BUILD_PLATFORMS contains a set of tuples [os arch suffix base_image addon_image]
# separated by semicolon. An empty variable or empty entry (= just a
# semicolon) builds for the default platform of the current Go
# toolchain.
BUILD_PLATFORMS =

The default value is:

configvar CSI_PROW_BUILD_PLATFORMS "linux amd64; linux ppc64le -ppc64le; linux s390x -s390x; linux arm -arm; linux arm64 -arm64; windows amd64 .exe nanoserver:1809 servercore:ltsc2019; windows amd64 .exe nanoserver:1909 servercore:1909; windows amd64 .exe nanoserver:2004 servercore:2004; windows amd64 .exe nanoserver:20H2 servercore:20H2; windows amd64 .exe nanoserver:ltsc2022 servercore:ltsc2022" "Go target platforms (= GOOS + GOARCH) and file suffix of the resulting binaries"

After trying to add linux arm/v7 -armv7 (ref https://github.com/kubernetes-csi/external-provisioner/issues/691) as another target I realized that even though arm/v7 is a valid docker buildx platform value it's not a correct GOARCH value and therefore compilation of the binary fails.

We could add another arg after arch that's the docker buildx platform, the new tuple would be [os arch buildx_platform suffix base_image addon_image], the config for armv7 would be linux arm arm/v7 -armv7

/cc @pohly @msau42 @xing-yang

pohly commented 2 years ago

Has it been decided that supporting arm/v7 is something that we want to do?

pohly commented 2 years ago

Does the Kubernetes project support it with releases of pre-built binaries?

mauriciopoppe commented 2 years ago

Has it been decided that supporting arm/v7 is something that we want to do?

Not yet, I've added this item to our 1.24 board for discussion.

Does the Kubernetes project support it with releases of pre-built binaries?

I checked that https://github.com/kubernetes/kubernetes/blob/30e588c5fe0a4bb556bc13e9196ecf1487882295/CHANGELOG/CHANGELOG-1.24.md shows arm binaries (I think this is the 32 bit binary that can run in Raspberry Pi armv7).

pohly commented 2 years ago

We discussed this at today's Kubernetes-CSI meeting and agreed to proceed with arm/v7 support based on the argument that Kubernetes supports it.