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

unable to find a version that was supported for platform darwin/arm64 #1657

Closed
ctrought opened this issue Sep 9, 2021 · 8 comments
Closed
Assignees
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@ctrought
Copy link

ctrought commented Sep 9, 2021

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"}
@yoichiwo7
Copy link

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

@rmetzger
Copy link

rmetzger commented Dec 8, 2021

Native binaries for darwin/arm64 would be much appreciated!

@dntosas
Copy link

dntosas commented Feb 20, 2022

pushed a PR to init the mitigation of this, you can give a thumb up in here --> kubernetes-sigs/kubebuilder#2516

@avizov
Copy link

avizov commented Mar 4, 2022

when do you plan to release a new version which includes this fix?

jasonBirchall added a commit to ministryofjustice/analytical-platform-tools-operator that referenced this issue Apr 19, 2022
envtest needs this switch to allow you to run from m1 macbooks. This is noted in a helpful comment here: kubernetes-sigs/controller-runtime#1657 (comment)
@k8s-triage-robot
Copy link

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 2, 2022
@FillZpp
Copy link
Contributor

FillZpp commented Jun 6, 2022

/remove-lifecycle stale

The latest progress is here: kubernetes-sigs/kubebuilder#1932 (comment)

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 6, 2022
kirederik added a commit to syntasso/kratix that referenced this issue Jun 27, 2022
kubebuilder-tools does not yet support darwin/arm64.
Providing the "--arch amd64" is a workaround for running the
setup-envtest on M1

See kubernetes-sigs/controller-runtime#1657

[#182466806]
@k8s-triage-robot
Copy link

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/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was 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

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 4, 2022
@camilamacedo86
Copy link
Member

camilamacedo86 commented Sep 5, 2022

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.

@camilamacedo86 camilamacedo86 self-assigned this Sep 5, 2022
joelddiaz pushed a commit to mondoohq/mondoo-operator that referenced this issue Sep 7, 2022
Went through the OperatorSDK tutorial twice. Once with the traditional/default v3 and once with --plugins="go/v4-alpha" as suggested in kubernetes-sigs/controller-runtime#1657 (comment) .

Did a recursive diff between the two directories, and these were the differences.

Signed-off-by: Joel Diaz <joel@mondoo.com>
joelddiaz pushed a commit to mondoohq/mondoo-operator that referenced this issue Sep 9, 2022
Went through the OperatorSDK tutorial twice. Once with the traditional/default v3 and once with --plugins="go/v4-alpha" as suggested in kubernetes-sigs/controller-runtime#1657 (comment) .

Did a recursive diff between the two directories, and these were the differences.

Signed-off-by: Joel Diaz <joel@mondoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

9 participants