Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add arm64 support #140

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ smb-windows:
smb-darwin:
CGO_ENABLED=0 GOOS=darwin go build -a -ldflags ${LDFLAGS} -o _output/smbplugin ./pkg/smbplugin

.PHONY: smb-arm64
smb-arm64:
CGO_ENABLED=0 GOARCH=arm64 go build -a -ldflags ${LDFLAGS} -o _output/smbplugin ./pkg/smbplugin

.PHONY: container
container: smb
docker build --no-cache -t $(IMAGE_TAG) -f ./pkg/smbplugin/dev.Dockerfile .
Expand All @@ -114,13 +118,17 @@ smb-container:
docker buildx rm container-builder || true
docker buildx create --use --name=container-builder
ifdef CI
make smb smb-windows
make smb
docker buildx build --no-cache --build-arg LDFLAGS=${LDFLAGS} -t $(IMAGE_TAG)-linux-amd64 -f ./pkg/smbplugin/Dockerfile --platform="linux/amd64" --push .
make smb-arm64
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx build --no-cache --build-arg LDFLAGS=${LDFLAGS} -t $(IMAGE_TAG)-linux-arm64 -f ./pkg/smbplugin/Dockerfile --platform="linux/arm64" --push .
Copy link
Contributor Author

@mayankshah1607 mayankshah1607 Oct 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andyzhangx I think this would do. But is make smb-container being called in the CI? I.e, the post image job?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's wait for the test result, I have credentials to push image to Azure Container Registry.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better move L120 to L119

Copy link

@msau42 msau42 Nov 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our Kubernetes release pipeline supprts multiarch now including arm. But you need to setup the cloudbuild.yaml files like in the other csi repos

make smb-windows
docker buildx build --no-cache --build-arg LDFLAGS=${LDFLAGS} -t $(IMAGE_TAG)-windows-1809-amd64 -f ./pkg/smbplugin/Windows.Dockerfile --platform="windows/amd64" --push .
docker manifest create $(IMAGE_TAG) $(IMAGE_TAG)-linux-amd64 $(IMAGE_TAG)-windows-1809-amd64
docker manifest create $(IMAGE_TAG) $(IMAGE_TAG)-linux-amd64 $(IMAGE_TAG)-linux-arm64 $(IMAGE_TAG)-windows-1809-amd64
docker manifest inspect $(IMAGE_TAG)
ifdef PUBLISH
docker manifest create $(IMAGE_TAG_LATEST) $(IMAGE_TAG)-linux-amd64 $(IMAGE_TAG)-windows-1809-amd64
docker manifest create $(IMAGE_TAG_LATEST) $(IMAGE_TAG)-linux-amd64 $(IMAGE_TAG)-linux-arm64 $(IMAGE_TAG)-windows-1809-amd64
docker manifest inspect $(IMAGE_TAG_LATEST)
endif
else
Expand Down