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


##########
docs/modules/ROOT/pages/running/gitops.adoc:
##########
@@ -70,7 +94,24 @@ As soon as the build of the Integration is completed, the 
operator will prepare
 
 The above structure could be used directly with `kubectl` (eg, `kubectl apply 
-k /tmp/integrations/sample/overlays/production`) or any CICD capable of 
running a similar deployment strategy.
 
-The important thing to notice is that the **base** Integration is adding the 
container image that we've just built and any other trait which is required for 
the application to run correctly (and without the need to be rebuilt) on 
another environment:
+For a Pipe, the structure is similar but uses `pipe.yaml` and 
`patch-pipe.yaml` instead:
+
+```bash
+/integrations/

Review Comment:
   ```suggestion
   /pipes/
   ```



##########
docs/modules/ROOT/pages/running/gitops.adoc:
##########
@@ -70,7 +94,24 @@ As soon as the build of the Integration is completed, the 
operator will prepare
 
 The above structure could be used directly with `kubectl` (eg, `kubectl apply 
-k /tmp/integrations/sample/overlays/production`) or any CICD capable of 
running a similar deployment strategy.
 
-The important thing to notice is that the **base** Integration is adding the 
container image that we've just built and any other trait which is required for 
the application to run correctly (and without the need to be rebuilt) on 
another environment:
+For a Pipe, the structure is similar but uses `pipe.yaml` and 
`patch-pipe.yaml` instead:
+
+```bash
+/integrations/
+└── timer-to-log
+    ├── base

Review Comment:
   It seems the `all` profile is missing. Is it a typo or you missed the 
implementation? in the second case, feel free to log a follow up issue and we 
can work on it separately.



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



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