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

[kubebuilder] Remove GOARCH to make it work on the Apple Silicon(M1/M2) env #562

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LittleWat
Copy link
Contributor

@LittleWat LittleWat commented Mar 15, 2024

change

  • [kubebuilder] Remove GOARCH to make it work on the Apple Silicon(M1/M2)env

test

  • I confirmed that this works on both the linux amd64 env and the darwin arm64 env.

@LittleWat LittleWat changed the title [kubebuilder] Remove GOARCH to make it work on the Apple Silicon(M1/M… [kubebuilder] Remove GOARCH to make it work on the Apple Silicon(M1/M2) env Mar 15, 2024
…2)env

## change
- [kubebuilder] Remove GOARCH to make it work on the Apple Silicon(M1/M2)env

## test
- I confirmed that this works on both the linux amd64 env and the darwin arm64 env.

Signed-off-by: Kohei Watanabe <[email protected]>
@@ -36,7 +36,7 @@ def kubebuilder(DOMAIN, GROUP, VERSION, KIND, IMG='controller:latest', CONTROLLE

# build to tilt_bin beause kubebuilder has a dockerignore for bin/
def binary():
return 'CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -o tilt_bin/manager cmd/main.go'
return 'CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -o tilt_bin/manager cmd/main.go'
Copy link
Member

Choose a reason for hiding this comment

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

hmmm...i'm not sure this is quite right. you really want this to match the arch of the cluster, not the local machine.

you might be able to get the right arch with something like

$(tilt get cluster default -o=jsonpath --template="{.status.arch}")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants