Skip to content

Commit

Permalink
Override GOBIN for inv dev-env
Browse files Browse the repository at this point in the history
When GOBIN is already set, go install will install the binary to that
path. However,  line 'run("{}/bin/controller-gen...' expects
controller-gen to be installed under build/bin/controller-gen. Force
GOBIN to the correct value, always.

Reported-at: metallb#2218
Signed-off-by: Andreas Karis <ak.karis@gmail.com>
  • Loading branch information
andreaskaris committed Dec 18, 2023
1 parent cb39f24 commit 9011336
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def validate_kind_version():

def generate_manifest(ctx, crd_options="crd:crdVersions=v1", bgp_type="native", output=None, with_prometheus=False):
_fetch_kubectl()
run("GOPATH={} go install sigs.k8s.io/controller-tools/cmd/controller-gen@{}".format(build_path, controller_gen_version))
run("GOBIN={}/bin/ GOPATH={} go install sigs.k8s.io/controller-tools/cmd/controller-gen@{}".format(build_path, build_path, controller_gen_version))
res = run("{}/bin/controller-gen {} rbac:roleName=manager-role webhook paths=\"./api/...\" output:crd:artifacts:config=config/crd/bases".format(build_path, crd_options))
if not res.ok:
raise Exit(message="Failed to generate manifests")
Expand Down
1 change: 1 addition & 0 deletions website/content/release-notes/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Chores:
- E2E: Receive prefixes using frr-k8s alongside MetalLB ([PR 2211](https://github.com/metallb/metallb/pull/2211))
- Images updated to Go 1.20.12 ([PR 2213](https://github.com/metallb/metallb/pull/2213))
- CI/E2E: Relabel the frr metrics from frr-k8s to show as MetalLB's ([PR 2210](https://github.com/metallb/metallb/pull/2210))
- Dev-env: Override GOBIN for inv dev-env ([PR 2219](https://github.com/metallb/metallb/pull/2219))

## Version 0.13.12

Expand Down

0 comments on commit 9011336

Please sign in to comment.