beegfs-csi-driver
beegfs-csi-driver copied to clipboard
Add support for ARM64
Just wanted to report that it builds okay:
- BeeGFS CSI driver v1.2.1-0-g316c1cd
- Ubuntu 20.04.4 LTS (4.9.277-83) with go v1.17
$ make
./release-tools/verify-go-version.sh "go"
======================================================
WARNING
This projects is tested with Go v1.15.
Your current Go version is v1.17.
This may or may not be close enough.
In particular test-gofmt and test-vendor
are known to be sensitive to the version of
Go.
======================================================
mkdir -p bin
echo '' | tr ';' '\n' | while read -r os arch suffix; do \
if ! (set -x; CGO_ENABLED=0 GOOS="$os" GOARCH="$arch" go build -a -ldflags ' -X main.version=v1.2.1-0-g316c1cd -extldflags "-static"' -o "./bin/beegfs-csi-driver$suffix" ./cmd/beegfs-csi-driver); then \
echo "Building beegfs-csi-driver for GOOS=$os GOARCH=$arch failed, see error(s) above."; \
exit 1; \
fi; \
done
+ CGO_ENABLED=0 GOOS= GOARCH= go build -a -ldflags -X main.version=v1.2.1-0-g316c1cd -extldflags "-static" -o ./bin/beegfs-csi-driver ./cmd/beegfs-csi-driver
$ ./bin/beegfs-csi-driver -version
beegfs-csi-driver v1.2.1-0-g316c1cd
Thanks for trying @scaleoutsean! We don't currently run the driver on ARM as part of our test/release process, but we're definitely curious to hear more about your experiences doing so. It looks like the Kubernetes sidecar containers (e.g. csi-provisioner) might have ARM versions, and the distroless container we build the driver from should also support ARM, so a full deployment should be possible. However, I'm guessing there would be some hacking required (at least in various manifests, etc.) to get it up.
If you have use cases that require full ARM support, let us know what they are and we'll see about getting it prioritized for future releases (or consider contributing!).
@ejweber I don't think it'll be too difficult to figure this out - I've been building and using Trident for ARM64 for 1+ year now. It does involve some search & replace plus (on Trident CSI) building containers with Distroless for ARM64 base layer as you mention, but no code changes. (For some other architectures I had to patch tiny parts of the Trident source code). I haven't had requests from BeeGFS-CSI users yet, but I did from Trident CSI users (see Trident issue 534), and there are probably those who built their own).
Probably the major blocker to adding official ARM support is all the work needed to expand our CI environment to cover it. We're discussing this internally and considering adding it to our roadmap, but don't have anything concrete at this time. I'm tagging this as an enhancement and leaving it open so we can gauge how much interest there is in the driver officially supporting ARM.
Update: I tested the rest (build containers, deploy, create PVCs) - it works fine.