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

fix testenv docs #2632

Closed
wants to merge 7 commits into from
Closed

Conversation

gx14ac
Copy link

@gx14ac gx14ac commented Apr 23, 2022

Description:

I was trying kubebuilder the other day in an Apple Sillicon m1 mac arm64 environment and found that it did not work when run as documented.
From the issues and PR it looks like these issues have been resolved.
I think the documentation needs to be meticulous so as not to discourage first-time users from doing the tutorial.
This is my first commit to kubebuilder, so please let me know if there is anything I can do to help.
Also, if there is anything else in the documentation that you would like to see changed, I will help.

tied issue

Motivation

kubernetes-sigs/controller-runtime#1657
#2516

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 23, 2022
@k8s-ci-robot
Copy link
Contributor

Welcome @shintard!

It looks like this is your first PR to kubernetes-sigs/kubebuilder 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kubebuilder has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 23, 2022
@k8s-ci-robot
Copy link
Contributor

Hi @shintard. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: shintard
To complete the pull request process, please assign pwittrock after the PR has been reviewed.
You can assign the PR to them by writing /assign @pwittrock in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

However, in the case of M1 Mac using AppleSillicon, the arm64 binary is not yet available, so the test in the Makefile must be changed.
```makefile
test: manifests generate fmt vet envtest ## Run tests.
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) --arch=amd64 use $(ENVTEST_K8S_VERSION) -p path)" go test ./... -coverprofile cover.out
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the amd64 working in the AppleSillicon?

Copy link
Author

@gx14ac gx14ac Apr 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you say, there is no kubebuilder-tools supporting darwin/arm64, so using this flag will allow Apple Sillicon to run binaries for intel via Rosseta. (Temporary solution)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @shintard,

I checked all that is missing for we support the Apple Silicon and I updated the comment: #1932 (comment)

@@ -72,6 +72,8 @@ make docker-build docker-push IMG=<some-registry>/<project-name>:tag
make deploy IMG=<some-registry>/<project-name>:tag
```

If you are using an Apple Sillicon M1 Mac, you need to follow the instructions [here](/reference/envtest.md#installation).
Copy link
Member

@camilamacedo86 camilamacedo86 Apr 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the project does not support arm64 yet.
It is not the only place that would need to receive some tweaks to work with probably.
I think for now we could have a FAQ section and then add there the steps/info
WDYT?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a very good idea to post this description in the FAQ section!
Can we maintain the documentation that way?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have the wish to create the FAQ for too long and we have other things to add.
I think that it is also a nice one to go there.

Copy link
Member

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution 🥇

The goal of this PR is to let users know how to use Kubebuilder with Apple Silicon which is not supported. We have for too long the desire to have a FAQ section, so if we would move forward with IMO that would fit in well under this section.

Also, see here what we need to do support Apple Silicon: #1932 (comment)

In this way, if we would like to have this info in the docs, (ihmo) we need to:
a) create the FAQ section
b) add the info on why were are not supporting darwin/arm64 yet. What is done and what is not.
c) we need to fix the PR title accordingly because we use it in the release notes. See the CONTRIBUTION guide : https://github.com/kubernetes-sigs/kubebuilder/blob/master/CONTRIBUTING.md#pr-process
WDYT?

@camilamacedo86
Copy link
Member

Closing this one because asap we have the etcd bin etcd-io/etcd#14001 (comment) and from Kubebuilder 3.5.* release we will be able to have all working on for Apple Silicon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants