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

Improve message error when IntegrationPlatform failure #2996

Closed
ruromero opened this issue Feb 8, 2022 · 3 comments
Closed

Improve message error when IntegrationPlatform failure #2996

ruromero opened this issue Feb 8, 2022 · 3 comments
Labels
area/ux Improves user experience status/stale

Comments

@ruromero
Copy link

ruromero commented Feb 8, 2022

Using Camel-K operator 1.8.0

I want to create an integration using an openapi spec in a configmap. The configmap looks like this:

apiVersion: v1
metadata:
  name: customer-credit-rating-openapi
  namespace: mercury
data:
  CustomerCreditRating.json: |-
...

Then I create an integration like the following:

spec:
  dependencies:
  - mvn:com.redhat.mercury:customer-credit-rating-common:1.0.1-SNAPSHOT
  - camel:protobuf
  flows:
   ...
  traits:
    environment:
      configuration:
        vars:
        - MERCURY_BINDING_SERVICE_HOST=customer-credit-rating
        - MERCURY_BINDING_SERVICE_PORT=9000
    openapi:
      configuration:
        configmaps:
        - customer-credit-rating-openapi

The operator fails to succeed with the following error:

{"level":"error","ts":1644271838.5132942,"logger":"controller.integration-controller","msg":"Reconciler error","reconciler group":"camel.apache.org","reconciler kind":"Integration","name":"customer-credit-rating-camelk-rest","namespace":"mercury","error":"error during trait customization: cannot generate configmap for openapi resource CustomerCreditRating.json: ConfigMap \"\" not found","errorVerbose":"ConfigMap \"\" not found\ncannot generate configmap for openapi resource CustomerCreditRating.json\ngithub.com/apache/camel-k/pkg/trait.(*openAPITrait).generateFromDataSpecs\n\tgithub.com/apache/camel-k/pkg/trait/openapi.go:167\ngithub.com/apache/camel-k/pkg/trait.(*openAPITrait).generateFromConfigmaps\n\tgithub.com/apache/camel-k/pkg/trait/openapi.go:157\ngithub.com/apache/camel-k/pkg/trait.(*openAPITrait).Apply\n\tgithub.com/apache/camel-k/pkg/trait/openapi.go:110\ngithub.com/apache/camel-k/pkg/trait.(*Catalog).apply\n\tgithub.com/apache/camel-k/pkg/trait/trait_catalog.go:113\ngithub.com/apache/camel-k/pkg/trait.Apply\n\tgithub.com/apache/camel-k/pkg/trait/trait.go:47\ngithub.com/apache/camel-k/pkg/controller/integration.(*platformSetupAction).Handle\n\tgithub.com/apache/camel-k/pkg/controller/integration/platform_setup.go:54\ngithub.com/apache/camel-k/pkg/controller/integration.(*reconcileIntegration).Reconcile\n\tgithub.com/apache/camel-k/pkg/controller/integration/integration_controller.go:309\ngithub.com/apache/camel-k/pkg/util/monitoring.(*instrumentedReconciler).Reconcile\n\tgithub.com/apache/camel-k/pkg/util/monitoring/controller.go:70\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tsigs.k8s.io/controller-runtime@v0.9.7/pkg/internal/controller/controller.go:298\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tsigs.k8s.io/controller-runtime@v0.9.7/pkg/internal/controller/controller.go:253\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\tsigs.k8s.io/controller-runtime@v0.9.7/pkg/internal/controller/controller.go:214\nruntime.goexit\n\truntime/asm_amd64.s:1371\nerror during trait customization\ngithub.com/apache/camel-k/pkg/trait.Apply\n\tgithub.com/apache/camel-k/pkg/trait/trait.go:48\ngithub.com/apache/camel-k/pkg/controller/integration.(*platformSetupAction).Handle\n\tgithub.com/apache/camel-k/pkg/controller/integration/platform_setup.go:54\ngithub.com/apache/camel-k/pkg/controller/integration.(*reconcileIntegration).Reconcile\n\tgithub.com/apache/camel-k/pkg/controller/integration/integration_controller.go:309\ngithub.com/apache/camel-k/pkg/util/monitoring.(*instrumentedReconciler).Reconcile\n\tgithub.com/apache/camel-k/pkg/util/monitoring/controller.go:70\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tsigs.k8s.io/controller-runtime@v0.9.7/pkg/internal/controller/controller.go:298\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tsigs.k8s.io/controller-runtime@v0.9.7/pkg/internal/controller/controller.go:253\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\tsigs.k8s.io/controller-runtime@v0.9.7/pkg/internal/controller/controller.go:214\nruntime.goexit\n\truntime/asm_amd64.s:1371","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\tsigs.k8s.io/controller-runtime@v0.9.7/pkg/internal/controller/controller.go:214"}

I have used this approach successfully with kamel 1.8.0 but it no longer works.

@ruromero
Copy link
Author

ruromero commented Feb 8, 2022

cc @squakez

@ruromero
Copy link
Author

ruromero commented Feb 8, 2022

The problem seems to be related to a wrongly configured IntegrationPlatform. In my case it was missing the settings.xml
But the error message was pointing me to a completely different place.

@squakez squakez changed the title OpenAPI trait can't find ConfigMap Improve message error when IntegrationPlatform failure Feb 10, 2022
@squakez squakez added the area/ux Improves user experience label Feb 22, 2022
@github-actions
Copy link
Contributor

This issue has been automatically marked as stale due to 90 days of inactivity.
It will be closed if no further activity occurs within 15 days.
If you think that’s incorrect or the issue should never stale, please simply write any comment.
Thanks for your contributions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ux Improves user experience status/stale
Projects
None yet
Development

No branches or pull requests

2 participants