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

Build kubebuilder-tools for darwin/arm64 #2664

Closed
camilamacedo86 opened this issue Apr 30, 2022 · 5 comments
Closed

Build kubebuilder-tools for darwin/arm64 #2664

camilamacedo86 opened this issue Apr 30, 2022 · 5 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@camilamacedo86
Copy link
Member

What do you want to happen?

Description

The goal of this task is to begin to generate the kubebuilder-tools with darwin/arm64 in order to support Apple Silicon. The artefacts must be produced and be available in: https://storage.googleapis.com/kubebuilder-tools

Kubebuilder projects require artefacts which are used to do the tests with ENV TEST (when we call make test target). The build is made from the branch tools-releases and the trigger will call the build/cloudbuild_tools.yaml passing
as argument the architecture and the SO that should be used, e.g:

Screenshot 2022-04-30 at 10 15 41

For further information see the README.

What was done

  • The trigger on the Google Cloud to generate the artefact is created.

What do you still needing to do

The required etcd binary does not exist for this format:

Step #0:  ---> Running in 161150d5d6d4
Step #0: Archive:  etcd-v3.5.1-darwin-arm64.zip
Step #0:   End-of-central-directory signature not found.  Either this file is not
Step #0:   a zipfile, or it constitutes one disk of a multi-part archive.  In the
Step #0:   latter case the central directory and zipfile comment will be found on
Step #0:   the last disk(s) of this archive.
Step #0: unzip:  cannot find zipfile directory in one of etcd-v3.5.1-darwin-arm64.zip or
Step #0:         etcd-v3.5.1-darwin-arm64.zip.zip, and cannot find etcd-v3.5.1-darwin-arm64.zip.ZIP, period.
Step #0: The command '/bin/sh -c curl -sLO https://github.com/coreos/etcd/releases/download/${ETCD_VERSION}/${ETCD_BASE_NAME}.zip &&     unzip -o ${ETCD_BASE_NAME}.zip &&     cp ${ETCD_BASE_NAME}/etcd $DEST' returned a non-zero code: 9
Finished Step #0
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/docker" failed: step exited with non-zero status: 9
Step #0: 

The following options to address this requirement are:
a) ask for ectd begin to be produced for darwin/arm64
OR
b) we will need to produce this binary in the architecture desired as we do it for # kube-apiserver . See: https://github.com/kubernetes-sigs/kubebuilder/blob/tools-releases/build/thirdparty/darwin/Dockerfile#L36-L42

Also, when we are able to produce the artefact we should also update the README to provide this information

Extra Labels

No response

@camilamacedo86
Copy link
Member Author

To achieve this goal we are looking for the etcd project to add the zip bin to be downloaded then we just retrigger the job to have it done from k8s 1.24. see: etcd-io/etcd#14001 (comment)

@owen-lynch-ibm
Copy link

+1 for this

@camilamacedo86
Copy link
Member Author

camilamacedo86 commented Jun 23, 2022

It is done now:

We have now kubebuilder-tools for darwin/arm64. Thank you [@akutz(https://kubernetes.slack.com/team/U3TALNNNB)
for your contribution.

See here all versions/platforms supported

@rajendragosavi
Copy link

@camilamacedo86 , I am still facing the issue while running tests using kubebuilder.

STEP: bootstrapping test environment
1.6562680699767098e+09	DEBUG	controller-runtime.test-env	starting control plane
1.656268069979717e+09	ERROR	controller-runtime.test-env	unable to start the controlplane	{"tries": 0, "error": "exec: \"etcd\": executable file not found in $PATH"}

I am using M1 machine. Can you proide more information on how to solve this?

I have updated my kubebuilder to latest version:

_kubebuilder version_
Version: main.version{KubeBuilderVersion:"3.5.0", KubernetesVendor:"1.24.1", GitCommit:"26d12ab1134964dbbc3f68877ebe9cf6314e926a", BuildDate:"2022-06-24T12:17:52Z", GoOs:"darwin", GoArch:"arm64"}

@rajendragosavi
Copy link

It works after upgrading kind to latest version >= 0.14 and kubernetes version >= 1.24.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants