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

Keptn Dev Setup Fails due to mismatch of controller tools and go version #3627

Closed
shardulsrivastava opened this issue Aug 4, 2024 · 4 comments

Comments

@shardulsrivastava
Copy link
Contributor

shardulsrivastava commented Aug 4, 2024

Details

I am trying to setup the development environment for the lifecycle-toolkit based on the instructions here.

When running the make commands to build locally and deploy:
make build-deploy-dev-environment RELEASE_REGISTRY=ghcr.io/shardulsrivastava TAG=main ARCH=amd64

I am getting this error:

0.678 go: sigs.k8s.io/controller-tools/cmd/[email protected]: sigs.k8s.io/[email protected] requires go >= 1.22.0 (running go 1.21.12; GOTOOLCHAIN=local)
Full Error Log
    => ERROR [builder 6/7] RUN go install sigs.k8s.io/controller-tools/cmd/[email protected]                                                    0.8s
    ------
     > [builder 6/7] RUN go install sigs.k8s.io/controller-tools/cmd/[email protected]:
    0.510 go: downloading sigs.k8s.io/controller-tools v0.15.0
    0.678 go: sigs.k8s.io/controller-tools/cmd/[email protected]: sigs.k8s.io/[email protected] requires go >= 1.22.0 (running go 1.21.12; GOTOOLCHAIN=local)
    ------
    Dockerfile:17
    --------------------
      15 |     # renovate: datasource=github-releases depName=kubernetes-sigs/controller-tools
      16 |     ARG CONTROLLER_TOOLS_VERSION=v0.15.0
      17 | >>> RUN go install sigs.k8s.io/controller-tools/cmd/controller-gen@$CONTROLLER_TOOLS_VERSION
      18 |     
      19 |     ARG GIT_HASH
    --------------------
    ERROR: failed to solve: process "/bin/sh -c go install sigs.k8s.io/controller-tools/cmd/controller-gen@$CONTROLLER_TOOLS_VERSION" did not complete successfully: exit code: 1
    make[1]: *** [Makefile:156: release-local.amd64] Error 1
    make[1]: Leaving directory '/workspaces/lifecycle-toolkit/keptn-cert-manager'
    make: *** [Makefile:156: build-deploy-certmanager] Error 2

which seems to indicate that controller-tools needs go-lang version 1.22 as opposed to v1.21 used in the Dockerfile.

Fix

I worked around the issue by using the controller tools version v0.14.0. So this works :

make build-deploy-dev-environment RELEASE_REGISTRY=ghcr.io/shardulsrivastava TAG=main ARCH=amd64 CONTROLLER_TOOLS_VERSION=v0.14.0
@mowies
Copy link
Member

mowies commented Aug 5, 2024

Thanks for posting this! We're looking into it.

@odubajDT
Copy link
Contributor

odubajDT commented Aug 5, 2024

Can you please try again? We updated some dependencies that should fix this. Thanks!

@shardulsrivastava
Copy link
Contributor Author

It works now, thanks.

@mowies @odubajDT I would like to contribute the devcontainer configuration for setting up the development environment of the lifecycle toolkit in codespaces, would that be something interesting to you?

@mowies
Copy link
Member

mowies commented Aug 16, 2024

Sure sounds good. If you could write a quick issue for it describing what you're looking for and what the benefits are, that would be great :)

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

No branches or pull requests

3 participants