michalvavrik commented on code in PR #6557:
URL: https://github.com/apache/camel-k/pull/6557#discussion_r3011119434


##########
pkg/trait/gitops.go:
##########
@@ -146,11 +158,22 @@ func (t *gitOpsTrait) pushGitOpsItInGitRepo(ctx 
context.Context, it *v1.Integrat
                return err
        }
 
-       for _, overlay := range t.getOverlays() {
-               destIntegration := util.EditIntegration(it, kit, overlay, "")
-               err = util.AppendKustomizeIntegration(destIntegration, ciCdDir, 
t.getOverwriteOverlay())
-               if err != nil {
-                       return err
+       if pipe != nil {
+               for _, overlay := range t.getOverlays() {
+                       destPipe := util.EditPipe(pipe, it, kit, overlay, "")
+                       destPipe.Spec.Traits.GitOps = nil // avoid infinite 
loop on destination cluster

Review Comment:
   > We better change the `util.EditPipe` to embed the logic instead and make 
it the same as for `util.EditIntegration`
   
   moved with the exact comment as in the `util.EditIntegration`



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