You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a repo where where one apigroup uses EAS and other api groups use CRD. We are trying to use controller-gen to generate CRD yamls. But it fails with an error like below:
Generating CRD manifests
/go/src/stash.appscode.dev/stash/apis/repositories/types.go:28:2: enountered struct field "" without JSON tag in type "Snapshot"
/go/src/stash.appscode.dev/stash/apis/repositories/types.go:29:2: enountered struct field "" without JSON tag in type "Snapshot"
/go/src/stash.appscode.dev/stash/apis/repositories/types.go:30:2: enountered struct field "Status" without JSON tag in type "Snapshot"
stash.appscode.dev/stash/apis/repositories:-: CRD for Snapshot.repositories.stash.appscode.com has no storage version
stash.appscode.dev/stash/apis/repositories/v1alpha1:-: conflicting types in allOf branches in schema: array vs object
Error: not all generators ran successfully
Usage:
controller-gen [flags]
@droot / @DirectXMan12 , can this issue get some love? We are looking to use Kubebuilder for the new CRD GA features. This is a blocker for us adopting Kubebuilder.
hey, sorry, somehow I missed this in my normal triage
It should be possible to skip internal packages. I'd be in favor of having a marker that indicated internal packages or whatever.
Are you willing to submit a PR? It should be a pretty simple PR -- you'll need to change the logic in "pkg/crd/parser".Parser.indexTypes that populates the group-version for each package to skip internal packages using the marker.
Activity
tamalsaha commentedon Sep 20, 2019
@droot / @DirectXMan12 , can this issue get some love? We are looking to use Kubebuilder for the new CRD GA features. This is a blocker for us adopting Kubebuilder.
DirectXMan12 commentedon Sep 20, 2019
hey, sorry, somehow I missed this in my normal triage
It should be possible to skip internal packages. I'd be in favor of having a marker that indicated internal packages or whatever.
Are you willing to submit a PR? It should be a pretty simple PR -- you'll need to change the logic in
"pkg/crd/parser".Parser.indexTypesthat populates the group-version for each package to skip internal packages using the marker.DirectXMan12 commentedon Sep 20, 2019
/kind feature
tamalsaha commentedon Sep 21, 2019
@DirectXMan12 , I took an attempt at implementing this feature #325 . PTAL.