build: target host architecture for local builds and envtest
Local container image builds and envtest binaries were pinned to amd64, forcing emulation (e.g. Rosetta) on Apple Silicon and other arm64 hosts. This produced amd64 images/test binaries locally, which can surface subtle runtime bugs. envtest now publishes arm64 binaries (including darwin/arm64), so the historical amd64 pin (and the Darwin-specific override) is no longer needed. Derive the architecture from the host Go toolchain (go env GOARCH) so local builds are native, while keeping both values overridable for cross-arch builds. Multi-arch release images are built by the fluxcd/gha-workflows release workflow, not by "make docker-build", so release artifacts are unaffected. Signed-off-by: leigh capili <leigh@null.net>
This commit is contained in:
@@ -2,8 +2,9 @@ VERSION?=$(shell grep 'VERSION' cmd/flux/main.go | awk '{ print $$4 }' | head -n
|
||||
DEV_VERSION?=0.0.0-$(shell git rev-parse --abbrev-ref HEAD)-$(shell git rev-parse --short HEAD)-$(shell date +%s)
|
||||
EMBEDDED_MANIFESTS_TARGET=cmd/flux/.manifests.done
|
||||
TEST_KUBECONFIG?=/tmp/flux-e2e-test-kubeconfig
|
||||
# Architecture to use envtest with
|
||||
ENVTEST_ARCH ?= amd64
|
||||
# Architecture to use envtest with; defaults to the host architecture.
|
||||
LOCALARCH ?= $(shell go env GOARCH)
|
||||
ENVTEST_ARCH ?= $(LOCALARCH)
|
||||
|
||||
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
|
||||
ifeq (,$(shell go env GOBIN))
|
||||
|
||||
Reference in New Issue
Block a user