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


##########
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:
   Ditto



##########
pkg/apis/camel/v1/common_types.go:
##########
@@ -55,6 +55,8 @@ type BuildConfiguration struct {
        LimitMemory string `property:"limit-memory" 
json:"limitMemory,omitempty"`
        // The node selector for the builder pod. Only used for `pod` strategy
        NodeSelector map[string]string `property:"node-selector" 
json:"nodeSelector,omitempty"`
+       // Annotation to use for the builder pod. Only user for `pod` strategy

Review Comment:
   ```suggestion
        // Annotation to use for the builder pod. Only used for `pod` strategy
   ```



##########
pkg/cmd/operator/operator.go:
##########
@@ -165,8 +165,8 @@ func Run(healthPort, monitoringPort int32, leaderElection 
bool, leaderElectionID
                // in which case it's not possible to determine a namespace.
                operatorNamespace = watchNamespace
                if operatorNamespace == "" {
-                       leaderElection = false
-                       log.Info("unable to determine namespace for leader 
election")
+                       // We cannot go forward anyhow since later on we need a 
namespace to create resources

Review Comment:
   Please, open a separate PR for this change so we can have a more focused 
look on what it really involves.



##########
pkg/controller/integrationkit/build.go:
##########
@@ -133,8 +133,10 @@ func (action *buildAction) handleBuildSubmitted(ctx 
context.Context, kit *v1.Int
                        }
                }
                // The build operation, when executed as a Pod, should be 
executed by a container image containing the
-               // `kamel builder` command. Likely the same image running the 
operator should be fine.
-               buildConfig.ToolImage = platform.OperatorImage
+               // `kamel builder` command. If not specified, likely the same 
image running the operator should be fine.

Review Comment:
   I think we must force the image to be the one on which the operator is 
running. Please, open a separate PR to discuss this separately.



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