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

Doesn't work with go versions >1.19 #53

Closed
irreleph4nt opened this issue Sep 16, 2023 · 1 comment
Closed

Doesn't work with go versions >1.19 #53

irreleph4nt opened this issue Sep 16, 2023 · 1 comment

Comments

@irreleph4nt
Copy link

irreleph4nt commented Sep 16, 2023

I have forked this repo to implement a custom solver for desec, but found myself unable to deploy a working instance on my up-to-date Debian system. The issue has been pinpointed as the go version used for implementing the hook, as an updated version will necessitate an update in the Dockerfile as well. The same problem was encountered by another user in #27

Steps to reproduce:

  1. Install a version of go > 1.19 on a development machine
  2. Implement a hook
  3. Run go module init
  4. Run go mod tidy
  5. Extract go version from go.mod file and update the Dockerfile's FROM reference with it, i.e. set FROM golang:1.21-alpine3.18 AS build_dep
  6. Build docker image for hook
  7. Deploy hook

Expected Result:

The hook is deployed and the relevant cert-manager resources are up and running.

Actual Result:

The webhook pod does not start and ends in a CrashLoopBackOff state. Reviewing its logs, the following error shows up:
cert-manager: error executing command" err="error installing APIGroup for solvers: unable to get openapi models: OpenAPIV3 config must not be nil

Outcome:

Developers are forced to use either one of two ugly workarounds:

  1. Install an old and outdated version of go (i.e. v1.19) on your system before you start implementing a hook
  2. Diff your go.mod and go.sum files to those of another hook implemented in go v1.19, merging the newly added lines of your project into the existing lines of another working project, leaving the FROM reference in the Dockerfile at go v1.19
@SgtCoDFish
Copy link
Member

Thank you for raising this @irreleph4nt ! I'm going to close in favour of #27 since that has a bunch of discussion - any fix for #27 will make sure this builds using go 1.21 (since that's what we're generally using to develop other cert-manager subprojects).

Thanks again!

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

No branches or pull requests

2 participants