controller-runtime
controller-runtime copied to clipboard
unable to find a version that was supported for platform darwin/arm64
Is controller-runtime tools unsupported on darwin/arm64?
make test
/Users/ct/git/memcached-operator/bin/controller-gen "crd:trivialVersions=true,preserveUnknownFields=false" rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
/Users/ct/git/memcached-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
go fmt ./...
go vet ./...
go: creating new go.mod: module tmp
Downloading sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
go get: added sigs.k8s.io/controller-runtime/tools/setup-envtest v0.0.0-20210906140630-386c2b5b29ba
unable to find a version that was supported for platform darwin/arm64
KUBEBUILDER_ASSETS="" go test ./... -coverprofile cover.out
? gitlab.ca/it/ocp/example-operator [no test files]
? gitlab.ca/it/ocp/example-operator/api/v1alpha1 [no test files]
Running Suite: Controller Suite
===============================
Random Seed: 1631198122
Will run 0 of 0 specs
STEP: bootstrapping test environment
2021-09-09T10:35:22.533-0400 DEBUG controller-runtime.test-env starting control plane
2021-09-09T10:35:22.536-0400 ERROR controller-runtime.test-env unable to start the controlplane {"tries": 0, "error": "exec: \"etcd\": executable file not found in $PATH"}
It looks like there is no kubebuilder-tools that support darwin/arm64. Considering Intel Mac will be replaced by M1 Mac, the darwin/arm64 files must be added in near future.
https://storage.googleapis.com/kubebuilder-tools
However, there is a workaround for M1 Mac.
If you need to run kubebuilder-tools on M1 Mac, you can just add --arch=amd64option to setup-envtest command to use Intel binaries. The downloaded Intel binaries will run via Rosseta2.
Just modify Makefile's test target generated by kubebuilder:
test: manifests generate fmt vet envtest ## Run tests.
- KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test ./... -coverprofile cover.out
+ KUBEBUILDER_ASSETS="$(shell $(ENVTEST) --arch=amd64 use $(ENVTEST_K8S_VERSION) -p path)" go test ./... -coverprofile cover.out
Native binaries for darwin/arm64 would be much appreciated!
pushed a PR to init the mitigation of this, you can give a thumb up in here --> https://github.com/kubernetes-sigs/kubebuilder/pull/2516
when do you plan to release a new version which includes this fix?
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale - Mark this issue or PR as rotten with
/lifecycle rotten - Close this issue or PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
The latest progress is here: https://github.com/kubernetes-sigs/kubebuilder/issues/1932#issuecomment-1112564792
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale - Mark this issue or PR as rotten with
/lifecycle rotten - Close this issue or PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
You can check all available artefacts by looking at: https://storage.googleapis.com/kubebuilder-tools For darwin/arm64 you can use envtest from 1.24 k8s release
Also, if you want to build a project using this environment with Kubebuilder you need to use go/v4-alpha by initing the project with kubebuilder init --plugins=go/v4-alpha OR you must update/customize your scaffold to use kustomize 4.x version instead.
Closing this one as sorted out.