From e392900eebc0df118ee3c1d01471e658e7e89310 Mon Sep 17 00:00:00 2001 From: email Date: Mon, 27 Oct 2025 16:51:25 -0230 Subject: [PATCH] Add Windows ARM64 in Makefile --- Makefile | 2 ++ hack/envtest/windows/Dockerfile | 13 +++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 7ff128b9d..d48f1cad6 100644 --- a/Makefile +++ b/Makefile @@ -141,6 +141,7 @@ release-envtest: clean-release ## Build the envtest binaries by operating system OS=darwin ARCH=amd64 $(MAKE) release-envtest-docker-build OS=darwin ARCH=arm64 $(MAKE) release-envtest-docker-build OS=windows ARCH=amd64 $(MAKE) release-envtest-docker-build + OS=windows ARCH=arm64 $(MAKE) release-envtest-docker-build ./hack/envtest/update-releases.sh .PHONY: release-envtest-docker-build @@ -168,6 +169,7 @@ release-controller-gen: clean-release ## Build controller-gen binaries. RELEASE_BINARY=controller-gen-darwin-amd64 GOOS=darwin GOARCH=amd64 $(MAKE) release-binary RELEASE_BINARY=controller-gen-darwin-arm64 GOOS=darwin GOARCH=arm64 $(MAKE) release-binary RELEASE_BINARY=controller-gen-windows-amd64.exe GOOS=windows GOARCH=amd64 $(MAKE) release-binary + RELEASE_BINARY=controller-gen-windows-arm64.exe GOOS=windows GOARCH=arm64 $(MAKE) release-binary .PHONY: release-binary release-binary: $(RELEASE_DIR) diff --git a/hack/envtest/windows/Dockerfile b/hack/envtest/windows/Dockerfile index 701f7b9c1..aac9e5ea1 100644 --- a/hack/envtest/windows/Dockerfile +++ b/hack/envtest/windows/Dockerfile @@ -46,10 +46,15 @@ RUN /bin/bash -x -c ' \ cp _output/local/bin/${KUBE_BUILD_PLATFORMS}/kubectl.exe $DEST; }' # etcd -ENV ETCD_BASE_NAME=etcd-${ETCD_VERSION}-${OS}-${ARCH} -RUN curl -sfLO https://github.com/coreos/etcd/releases/download/${ETCD_VERSION}/${ETCD_BASE_NAME}.zip && \ - unzip -o ${ETCD_BASE_NAME}.zip && \ - cp ${ETCD_BASE_NAME}/etcd.exe $DEST +RUN ETCD_DL_ARCH="$ARCH"; \ + if [ "$ARCH" = "arm64" ]; then \ + echo "WARNING: etcd for arm64 is not available, downloading amd64 version instead."; \ + ETCD_DL_ARCH="amd64"; \ + fi; \ + ETCD_BASE_NAME="etcd-${ETCD_VERSION}-${OS}-${ETCD_DL_ARCH}"; \ + curl -sfLO https://github.com/coreos/etcd/releases/download/${ETCD_VERSION}/${ETCD_BASE_NAME}.zip && \ + unzip -o ${ETCD_BASE_NAME}.zip && \ + cp ${ETCD_BASE_NAME}/etcd.exe $DEST # Package into tarball. RUN tar -czvf /envtest-${KUBERNETES_VERSION}-${OS}-${ARCH}.tar.gz $DEST