nokia / adcs-issuer

BSD 3-Clause "New" or "Revised" License
41 stars 42 forks source link

with make all get "parser.go:98:29: undefined: v1beta1.Webhook" #6

Closed StefanSa closed 3 years ago

StefanSa commented 3 years ago

Hi there, i get with make manager this error message:

/root/go/pkg/mod/sigs.k8s.io/controller-tools@v0.2.0/pkg/webhook/parser.go:98:29: undefined: v1beta1.Webhook

this will not help:

(cd .. && GO111MODULE=on go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.0)

an help here. thanks

bergner commented 3 years ago

I faced the same issue recently. I've been able to build successfully after updating dependencies in go.mod. Most notably sigs.k8s.io/controller-tools v0.2.4, and in the Makefile updating the controller-gen step to go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.2.4 instead of 0.2.0.

StefanSa commented 3 years ago

Thanks @bergner that helped.

lknite commented 2 years ago

I'm in an older kubernetes cluster, 1.18. Trying to get adcs-issuer to work. I've installed the older cert-manager 0.11.0 mentioned in the README. Installed the latest go, kubebuilder, and make. Cloned this repo and ran make, then make install. I implemented the change mentioned above, which helped.

Now I'm seeing the below error. Since you had the fix above thought maybe you had a little more experience working in an older environment. Till we get upgraded to the latest kubernetes, need to get cert-manager working in 1.18 if at all possible.

go get: downgraded github.com/jetstack/cert-manager v1.7.1 => v0.13.1
go get: downgraded sigs.k8s.io/controller-tools v0.7.0 => v0.2.4
/home/lknite/go/bin/controller-gen "crd:trivialVersions=true" rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
controllers/adcsrequest_controller.go:29:2: no required module provides package github.com/jetstack/cert-manager/pkg/apis/certmanager/v1; to add it:
        go get github.com/jetstack/cert-manager/pkg/apis/certmanager/v1
Error: not all generators ran successfully
run `controller-gen crd:trivialVersions=true rbac:roleName=manager-role webhook paths=./... output:crd:artifacts:config=config/crd/bases -w` to see all available markers, or `controller-gen crd:trivialVersions=true rbac:roleName=manager-role webhook paths=./... output:crd:artifacts:config=config/crd/bases -h` for usage
make: *** [Makefile:48: manifests] Error 1

$ go get github.com/jetstack/cert-manager/pkg/apis/certmanager/v1
go get: upgraded github.com/jetstack/cert-manager v0.13.1 => v1.7.1
go get: upgraded sigs.k8s.io/controller-tools v0.2.4 => v0.7.0
bergner commented 2 years ago

@lknite I've had cert-manager v1.4.0 running on k8s 1.18 and I think also v1.3.1 at some point before that. Version 0.13.1 is much older and I wouldn't be surprised if a bunch of the yamls would need to reference "v1alpha" or similar rather than "v1".

lknite commented 2 years ago

@bergner Thank you, I may have found a solution to get the latest and greatest working. Troubleshooting. Will update here when I get it working.