You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/11/08 13:52:59 UTC

[GitHub] [camel-k] astefanutti commented on a change in pull request #2735: feat(cmd): OLM default discovery

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



##########
File path: pkg/util/olm/operator.go
##########
@@ -343,17 +345,31 @@ func fillDefaults(o Options) Options {
 	if o.Channel == "" {
 		o.Channel = DefaultChannel
 	}
-	if o.Source == "" {
-		o.Source = DefaultSource
-	}
-	if o.SourceNamespace == "" {
-		o.SourceNamespace = DefaultSourceNamespace
-	}
 	if o.StartingCSV == "" {
 		o.StartingCSV = DefaultStartingCSV
 	}
-	if o.GlobalNamespace == "" {
-		o.GlobalNamespace = DefaultGlobalNamespace
+	if isOCP, err := openshift.IsOpenShift(client); isOCP && err != nil {

Review comment:
       I'm not sure I understand the intent of `err != nil`. It seems the error should be returned instead.




-- 
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-unsubscribe@camel.apache.org

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