You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/12/02 09:15:41 UTC

[GitHub] [camel-k] lburgazzoli opened a new issue #1837: Unable to use Kamelet spec in a custom CRD

lburgazzoli opened a new issue #1837:
URL: https://github.com/apache/camel-k/issues/1837


   I'm trying to use the `Kamelet` spec in a custom controller built using operator-sdk 1.2.x but it looks like the manifests cannot be built, to reproduce the issue:
   
   1. install controller-gen v0.4.1
   2. install a recent kustomize
   3. operator-sdk init  --repo gihub.com/lburgazzoli/embedded-camel-k-cr
   4. operator-sdk create api  --group=example --version=v1alpha1 --kind=MyType
   5. add a Field of type `KameletSpec` to your spec, like:
   ```go
   // MyTypeSpec defines the desired state of MyType
   type MyTypeSpec struct {
   	Kamelet *camelv1alpha1.KameletSpec `json:"kamelet,omitempty"`
   }
   ```
   6. run `make manifests` and you should get an error like:
   ```
   $ make manifests 
   controller-gen "crd:trivialVersions=true" rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
   gihub.com/lburgazzoli/embedded-camel-k-cr/api/v1alpha1:-: conflicting types in allOf branches in schema: string vs object
   Error: not all generators ran successfully
   run `controller-gen crd:trivialVersions=true rbac:roleName=manager-role webhook paths=./... output:crd:artifacts:config=config/crd/bases -w` to see all available markers, or `controller-gen crd:trivialVersions=true rbac:roleName=manager-role webhook paths=./... output:crd:artifacts:config=config/crd/bases -h` for usage
   make: *** [Makefile:58: manifests] Error 1
   ```
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] astefanutti commented on issue #1837: Unable to use Kamelet spec in a custom CRD

Posted by GitBox <gi...@apache.org>.
astefanutti commented on issue #1837:
URL: https://github.com/apache/camel-k/issues/1837#issuecomment-737102038


   It seems related to the `JSONSchemaProps` field in `KameletSpec`.
   
   This used to work in controller-gen v0.4.0, and I suspect this is caused by https://github.com/kubernetes-sigs/controller-tools/commit/f8684f404f0f430181712b0f90721f90fb3637c6.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-k] astefanutti closed issue #1837: Unable to use Kamelet spec in a custom CRD

Posted by GitBox <gi...@apache.org>.
astefanutti closed issue #1837:
URL: https://github.com/apache/camel-k/issues/1837


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org