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


   When the 2 resources have same content, the errors in Operator log are:
   ```
   {
        "level": "error",
        "ts": 1643123820.7433438,
        "logger": "controller.integration-controller",
        "msg": "Reconciler error",
        "reconciler group": "camel.apache.org",
        "reconciler kind": "Integration",
        "name": "test-java-deploy-with-resources",
        "namespace": "default",
        "error": "error executing post actions: error during apply resource: 
default/test-java-deploy-with-resources: failed to create typed patch object: 
errors:\n  .spec.template.spec.containers[name=\"integration\"].volumeMounts: 
duplicate entries for key [mountPath=\"/etc/camel/resources\"]\n  
.spec.template.spec.volumes: duplicate entries for key 
[name=\"cm-73803b0d73dab7d44dcbc1223c34672ca281559d\"]",
        "errorVerbose": "error during apply resource: 
default/test-java-deploy-with-resources: failed to create typed patch object: 
errors:\n  .spec.template.spec.containers[name=\"integration\"].volumeMounts: 
duplicate entries for key [mountPath=\"/etc/camel/resources\"]\n  
.spec.template.spec.volumes: duplicate entries for key 
[name=\"cm-73803b0d73dab7d44dcbc1223c34672ca281559d\"]\nerror executing post 
actions\ngithub.com/apache/camel-k/pkg/trait.Apply\n\tgithub.com/apache/camel-k/pkg/trait/trait.go:55\ngithub.com/apache/camel-k/pkg/controller/integration.(*monitorAction).Handle\n\tgithub.com/apache/camel-k/pkg/controller/integration/monitor.go:118\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/control
 
ler-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tsigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:298\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tsigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:253\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\tsigs.k8s.io/[email protected]/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/[email protected]/pkg/internal/controller/controller.go:214"
   }
   ```
   
   and
   ```
   {
        "level": "error",
        "ts": 1643123779.723916,
        "logger": "controller.integration-controller",
        "msg": "Reconciler error",
        "reconciler group": "camel.apache.org",
        "reconciler kind": "Integration",
        "name": "test-java-deploy-with-resources",
        "namespace": "default",
        "error": "error executing post actions: error during apply resource: 
default/test-java-deploy-with-resources: failed to create typed patch object: 
errors:\n  .spec.template.spec.volumes: duplicate entries for key 
[name=\"cm-73803b0d73dab7d44dcbc1223c34672ca281559d\"]\n  
.spec.template.spec.containers[name=\"integration\"].volumeMounts: duplicate 
entries for key [mountPath=\"/etc/camel/resources\"]",
        "errorVerbose": "error during apply resource: 
default/test-java-deploy-with-resources: failed to create typed patch object: 
errors:\n  .spec.template.spec.volumes: duplicate entries for key 
[name=\"cm-73803b0d73dab7d44dcbc1223c34672ca281559d\"]\n  
.spec.template.spec.containers[name=\"integration\"].volumeMounts: duplicate 
entries for key [mountPath=\"/etc/camel/resources\"]\nerror executing post 
actions\ngithub.com/apache/camel-k/pkg/trait.Apply\n\tgithub.com/apache/camel-k/pkg/trait/trait.go:55\ngithub.com/apache/camel-k/pkg/controller/integration.(*monitorAction).Handle\n\tgithub.com/apache/camel-k/pkg/controller/integration/monitor.go:118\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/control
 
ler-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\tsigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:298\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tsigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:253\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\tsigs.k8s.io/[email protected]/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/[email protected]/pkg/internal/controller/controller.go:214"
   }
   ```
   In this case, we can see a single Configmap created.
   
   
   When teh content of the resources are diffeezent, we can see 2 configmaps 
created but there are these 2 errors:
   ```
   {
        "level": "error",
        "ts": 1643126159.1656606,
        "logger": "controller.integration-controller",
        "msg": "Reconciler error",
        "reconciler group": "camel.apache.org",
        "reconciler kind": "Integration",
        "name": "test-java-deploy-with-resources",
        "namespace": "default",
        "error": "error executing post actions: error during apply resource: 
default/test-java-deploy-with-resources: failed to create typed patch object: 
.spec.template.spec.containers[name=\"integration\"].volumeMounts: duplicate 
entries for key [mountPath=\"/etc/camel/resources\"]",
        "errorVerbose": "error during apply resource: 
default/test-java-deploy-with-resources: failed to create typed patch object: 
.spec.template.spec.containers[name=\"integration\"].volumeMounts: duplicate 
entries for key [mountPath=\"/etc/camel/resources\"]\nerror executing post 
actions\ngithub.com/apache/camel-k/pkg/trait.Apply\n\tgithub.com/apache/camel-k/pkg/trait/trait.go:55\ngithub.com/apache/camel-k/pkg/controller/integration.(*monitorAction).Handle\n\tgithub.com/apache/camel-k/pkg/controller/integration/monitor.go:118\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/[email protected]/pkg/internal/con
 
troller/controller.go:298\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tsigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:253\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\tsigs.k8s.io/[email protected]/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/[email protected]/pkg/internal/controller/controller.go:214"
   }
   ```
   and
   ```
   {
        "level": "error",
        "ts": 1643126138.6682713,
        "logger": "controller.integration-controller",
        "msg": "Reconciler error",
        "reconciler group": "camel.apache.org",
        "reconciler kind": "Integration",
        "name": "test-java-deploy-with-resources",
        "namespace": "default",
        "error": "error executing post actions: error during apply resource: 
default/test-java-deploy-with-resources: failed to create typed patch object: 
.spec.template.spec.containers[name=\"integration\"].volumeMounts: duplicate 
entries for key [mountPath=\"/etc/camel/resources\"]",
        "errorVerbose": "error during apply resource: 
default/test-java-deploy-with-resources: failed to create typed patch object: 
.spec.template.spec.containers[name=\"integration\"].volumeMounts: duplicate 
entries for key [mountPath=\"/etc/camel/resources\"]\nerror executing post 
actions\ngithub.com/apache/camel-k/pkg/trait.Apply\n\tgithub.com/apache/camel-k/pkg/trait/trait.go:55\ngithub.com/apache/camel-k/pkg/controller/integration.(*monitorAction).Handle\n\tgithub.com/apache/camel-k/pkg/controller/integration/monitor.go:118\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/[email protected]/pkg/internal/con
 
troller/controller.go:298\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\n\tsigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:253\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\tsigs.k8s.io/[email protected]/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/[email protected]/pkg/internal/controller/controller.go:214"
   }
   ```


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to