astefanutti commented on a change in pull request #2696:
URL: https://github.com/apache/camel-k/pull/2696#discussion_r729728027



##########
File path: pkg/install/operator.go
##########
@@ -438,7 +439,26 @@ func PlatformOrCollect(ctx context.Context, c 
client.Client, clusterType string,
                                return nil, err
                        }
                        if address == nil {
-                               return nil, errors.New("cannot find 
automatically a registry where to push images")
+                               // try KEP-1755

Review comment:
       I think we can remove that `// Kubernetes only (Minikube)` comment above 
now.

##########
File path: pkg/install/operator.go
##########
@@ -438,7 +439,26 @@ func PlatformOrCollect(ctx context.Context, c 
client.Client, clusterType string,
                                return nil, err
                        }
                        if address == nil {
-                               return nil, errors.New("cannot find 
automatically a registry where to push images")

Review comment:
       Should it have precedence over `minikube.FindRegistry`?

##########
File path: pkg/install/operator.go
##########
@@ -438,7 +439,26 @@ func PlatformOrCollect(ctx context.Context, c 
client.Client, clusterType string,
                                return nil, err
                        }
                        if address == nil {
-                               return nil, errors.New("cannot find 
automatically a registry where to push images")
+                               // try KEP-1755
+                               config := corev1.ConfigMap{}
+                               if err := c.Get(ctx, ctrl.ObjectKey{Namespace: 
"kube-public", Name: "local-registry-hosting"}, &config); err != nil {
+                                       if k8serrors.IsNotFound(err) {
+                                               return nil, errors.New("cannot 
find a registry where to push images")

Review comment:
       It seems it'll be redundant with the log statement emitted below?




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