squakez commented on a change in pull request #2217:
URL: https://github.com/apache/camel-k/pull/2217#discussion_r613024183



##########
File path: pkg/controller/kameletbinding/common.go
##########
@@ -129,21 +145,38 @@ func createIntegrationFor(ctx context.Context, c 
client.Client, kameletbinding *
                "to": to.URI,
        })
 
-       flow := map[string]interface{}{
+       flowFrom := map[string]interface{}{
                "from": map[string]interface{}{
                        "uri":   from.URI,
                        "steps": dslSteps,
                },
        }
-       encodedFlow, err := json.Marshal(flow)
+       encodedFrom, err := json.Marshal(flowFrom)
        if err != nil {
                return nil, err
        }
-       it.Spec.Flows = append(it.Spec.Flows, v1.Flow{RawMessage: encodedFlow})
+       it.Spec.Flows = append(it.Spec.Flows, v1.Flow{RawMessage: encodedFrom})
 
        return &it, nil
 }
 
+func setErrorHandlerKamelet(errorHandler *bindings.Binding, kameletSpec 
v1alpha1.Endpoint) error {

Review comment:
       I am not sure which would be the best approach for this part. I am using 
the `application.properties` as a place to store the error handler that will be 
eventually taken by the `kamelet` trait to be processed as a kamelet. Should we 
introduce an ad-hoc field on the `Integration` instead? I tried to put in the 
source `Meta` as we do for the `from` and `to` Kamelets, but those one are 
processed during the parse of the embedded route generated by the 
KameletBinding. @nicolaferraro @lburgazzoli any suggestion here is appreciated!




-- 
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:
us...@infra.apache.org


Reply via email to