mayadata-io / d-operators

Declarative patterns to write kubernetes controllers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

chore: generate custom resource definitions (CRDs)

AmitKumarDas opened this issue · comments

Refer - https://github.com/kubernetes-sigs/kubebuilder/tree/master/testdata/project-v3
Refer - https://github.com/jetstack/cert-manager

  • This issue is for 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     
    ```