airshipit / airshipctl

A CLI for managing declarative infrastructure.
Apache License 2.0
43 stars 49 forks source link

`make manifests` target doesn't work #664

Closed raliev12 closed 2 years ago

raliev12 commented 2 years ago

Describe the bug An attempt to regenerate CRDs using make manifests results in following error:

go get: added sigs.k8s.io/controller-tools v0.6.1 /root/go/bin/controller-gen crd:crdVersions=v1 rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=manifests/function/airshipctl-schemas /root/go/pkg/mod/sigs.k8s.io/kustomize/kyaml@v0.11.0/resid/gvk.go:21:2: encountered struct field "isClusterScoped" without JSON tag in type "Gvk" Error: not all generators ran successfully run controller-gen crd:crdVersions=v1 rbac:roleName=manager-role webhook paths=./... output:crd:artifacts:config=manifests/function/airshipctl-schemas -w to see all available markers, or controller-gen crd:crdVersions=v1 rbac:roleName=manager-role webhook paths=./... output:crd:artifacts:config=manifests/function/airshipctl-schemas -h for usage

Also, this target doesn't remove old CRDs which could be already removed completely from API definitions, so clean up step is also required.

Steps To Reproduce Run make manifests command.

Expected behavior CRDs should be generated without an error.

raliev12 commented 2 years ago

PS which solves the issue - https://review.opendev.org/c/airship/airshipctl/+/816768