rodcloutier commented on code in PR #5109:
URL: https://github.com/apache/camel-k/pull/5109#discussion_r1467611199


##########
pkg/cmd/operator/operator.go:
##########
@@ -295,7 +295,8 @@ func getOperatorImage(ctx context.Context, c ctrl.Reader) 
(string, error) {
        ns := platform.GetOperatorNamespace()
        name := platform.GetOperatorPodName()
        if ns == "" || name == "" {
-               return "", nil
+               // We are most likely running out of cluster. Let's take a 
chance and use the default value

Review Comment:
   But currently if you remove this, we cannot run out of cluster as this 
function is used to set the global `platform.Operator` which is eventually 
used, at least, in pkg/controller/integrationkit/build.go
   
   
https://github.com/apache/camel-k/blob/ec9406b410bcea0b2d74bfb0dc1ec57e50394d44/pkg/controller/integrationkit/build.go#L137
   
   This will result in a build resource that has not `ToolImage` thus it cannot 
be run at all. 
   
   This is actually one of the reason for the other PR #5110 which would allow 
to workaround this by explicitly specify a ToolImage regardless if we are 
running in a pod or not.



-- 
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: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to