-
Notifications
You must be signed in to change notification settings - Fork 1.8k
CRD generation : map values must be a named type, not *ast.StarExpr #2485
Copy link
Copy link
Closed
Labels
help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.
Description
Bug Report
What did you do?
Upgraded the operator-sdk to version v0.15.0, and used operator-sdk generate crds, to generate crd from spec : https://github.com/Orange-OpenSource/casskop/blob/master/pkg/apis/db/v1alpha1/cassandracluster_types.go#L818
What did you expect to see?
Having my crd object generated with the following logs :
$ operator-sdk generate crds
INFO[0000] Running CRD generator.
INFO[0001] CRD generation complete.What did you see instead? Under which circumstances?
$ operator-sdk generate crds
INFO[0000] Running CRD generator.
/Users/aguitton/workspace/casskop/casskop/pkg/apis/db/v1alpha1/cassandracluster_types.go:819:33: map values must be a named type, not *ast.StarExpr
FATA[0001] error generating CRDs from APIs in pkg/apis: error generating CRD manifests: error running CRD generator: not all generators ran successfullEnvironment
- operator-sdk version : v0.15.0
- go-version : 0.13
Possible Solution
The operator sdk have a dependency to sigs.k8s.io/controller-tools v0.2.4, which perform the schema validation during the crd generation, this module is the root cause of the error.
To fix this, there is a PR : kubernetes-sigs/controller-tools#317, which is not merged yet. Once the merge will be done, update the dependency should be enough (until it's done we forked the operator-sdk and the controller-tool).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.