Skip to content

update-codegen.sh does not install validation-gen #188

@grbinho

Description

@grbinho

Hi,

I'm playing around trying to create a k8s controller and I ran into this issue when trying to run code generation as described in the sample-controller repo. I'm very new to go and k8s controllers.

I ran

./hack/update-codegen.sh

and it resulted in

cannot find module providing package k8s.io/code-generator/cmd/validation-gen: import lookup disabled by -mod=vendor
        (Go version in go.mod is at least 1.14 and vendor directory exists.)

I did the go mod vendor and checked the folder for validaiton-gen and could not find it.
Some other generators were installed correctly.

I got it working by setting KUBE_CODEGEN_TAG (to v0.33.3).

Not sure if this is a bug in the kube_codegen.sh or something, just thought I check.

P.S.
I got the same result when I cloned the sample-controller repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions