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

S3 Controller install fails - Issue with the Script - ./scripts/build-controller.sh: line 110: controller-gen: command not found #234

Closed
texanraj opened this issue Aug 22, 2020 · 6 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@texanraj
Copy link

Describe the bug

make build-controller SERVICE=$SERVICE
go build -tags codegen -o bin/ack-generate cmd/ack-generate/main.go
./scripts/build-controller.sh s3
go: downloading sigs.k8s.io/controller-tools v0.3.1-0.20200716001835-4a903ddb7005
go: found sigs.k8s.io/controller-tools/cmd/controller-gen in sigs.k8s.io/controller-tools v0.3.1-0.20200716001835-4a903ddb7005
go: downloading gopkg.in/yaml.v3 v3.0.0-20190905181640-827449938966
go: downloading golang.org/x/tools v0.0.0-20200616195046-dc31b401abb5
go: downloading github.com/inconshreveable/mousetrap v1.0.0
go: downloading github.com/fatih/color v1.7.0
go: downloading github.com/gobuffalo/flect v0.2.0
go: downloading github.com/mattn/go-colorable v0.1.2
go: downloading github.com/mattn/go-isatty v0.0.8
go: downloading golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
go: downloading golang.org/x/mod v0.2.0
Building Kubernetes API objects for s3
Generating deepcopy code for s3
./scripts/build-controller.sh: line 110: controller-gen: command not found
Generating custom resource definitions for s3
./scripts/build-controller.sh: line 116: controller-gen: command not found
Building service controller for s3
Generating RBAC manifests for s3
./scripts/build-controller.sh: line 130: controller-gen: command not found

Steps to reproduce
Install the Std. prereq. as per ACK site

Expected outcome
Should be able to install the S3 Controller successfully

Environment
Kind cluster on Mac
kind version
kind v0.8.1 go1.14.4 darwin/amd64

@texanraj texanraj added the kind/bug Categorizes issue or PR as related to a bug. label Aug 22, 2020
@cc4i
Copy link

cc4i commented Aug 23, 2020

controller-gen is part of k8s controller-tools. Check out https://github.com/kubernetes-sigs/controller-tools.git and install controller-gen under $GOPATH/bin, and then you'll be able to run 'make build-controller SERVICE=$SERVICE' with success.

@jaypipes
Copy link
Collaborator

Apparently, running go get to install controller-gen on Mac doesn't place the downloaded/installed controller-gen binary into the PATH. :(

@dspaxton
Copy link

controller-gen is part of k8s controller-tools. Check out https://github.com/kubernetes-sigs/controller-tools.git and install controller-gen under $GOPATH/bin, and then you'll be able to run 'make build-controller SERVICE=$SERVICE' with success.

Can this be incorporated back into the docs as a pre-requisite?

@mhausenblas
Copy link
Contributor

Can this be incorporated back into the docs as a pre-requisite?

Totally.

@mhausenblas
Copy link
Contributor

OK, closing this now (again), it landed in https://aws.github.io/aws-controllers-k8s/dev-docs/testing/

@arajakul
Copy link
Contributor

arajakul commented Jan 3, 2021

For anyone hitting this problem also ensure the following $GOPATH/bin is part of your $PATH

See actions/setup-go#14 for more information

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

No branches or pull requests

6 participants