Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(WIP)chore: generate custom resource definitions for all custom resources #91

Closed
wants to merge 2 commits into from

Conversation

amitbhatt818
Copy link
Contributor

@amitbhatt818 amitbhatt818 commented Jul 5, 2020

  • This PR helps in generating crds by the help of controller-gen using types.go.

  • This PR is to automatically generate crds using types.go file. I tried to use controller-gen tool for generating the crds. But I faced multiple issues while generating the files.

    • There were some entity in our types.go (float64, InterfaceType)which is unsupported in controller-gen and because of that we are not able to perform action completely.
  • Error msg:

 Makefile:30: target 'Fetching' given more than once in the same rule
go run ./vendor/sigs.k8s.io/controller-tools/cmd/controller-gen/main.go "crd:trivialVersions=true" paths="./..." output:crd:artifacts:config=manifests/crd/bases
-: found packages types (apply.go) and v1alpha1 (doc.go) in /home/amit-bhatt/go/src/mayadata-io/d-operators/api/v1alpha1
/home/amit-bhatt/go/src/mayadata-io/d-operators/api/v1alpha1/job.go:109:22: unsupported type "float64"
/home/amit-bhatt/go/src/mayadata-io/d-operators/api/v1alpha1/job.go:118:29: unsupported type "float64"
/home/amit-bhatt/go/src/mayadata-io/d-operators/api/v1alpha1/job.go:119:29: unsupported type "float64"
/home/amit-bhatt/go/src/mayadata-io/d-operators/api/v1alpha1/patch_check.go:108:8: unsupported AST kind *ast.InterfaceType
/home/amit-bhatt/go/src/mayadata-io/d-operators/api/v1alpha1/task.go:95:24: unsupported type "float64"
Error: not all generators ran successfully
run `controller-gen crd:trivialVersions=true paths=./... output:crd:artifacts:config=manifests/crd/bases -w` to see all available markers, or `controller-gen crd:trivialVersions=true paths=./... output:crd:artifacts:config=manifests/crd/bases -h` for usage
exit status 1
make: *** [Makefile:33: manifests] Error 1     

Signed-off-by: Amit Bhatt amitbhatt818@gmail.com

…rces

Signed-off-by: Amit Bhatt <amitbhatt818@gmail.com>
@amitbhatt818 amitbhatt818 changed the title (WIP)chore: generate custom resource definitions for all custom resou… (WIP)chore: generate custom resource definitions for all custom resources Jul 5, 2020
Signed-off-by: Amit Bhatt <amitbhatt818@gmail.com>
@amitbhatt818 amitbhatt818 self-assigned this Jul 6, 2020
@amitbhatt818 amitbhatt818 linked an issue Jul 6, 2020 that may be closed by this pull request
@amitbhatt818
Copy link
Contributor Author

#84

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

chore: generate custom resource definitions (CRDs)
1 participant