christophd commented on code in PR #3358:
URL: https://github.com/apache/camel-k/pull/3358#discussion_r913225625


##########
pkg/cmd/operator/operator.go:
##########
@@ -245,11 +247,43 @@ func Run(healthPort, monitoringPort int32, leaderElection 
bool, leaderElectionID
        installCtx, installCancel := context.WithTimeout(context.Background(), 
1*time.Minute)
        defer installCancel()
        install.OperatorStartupOptionalTools(installCtx, c, watchNamespace, 
operatorNamespace, log)
+       exitOnError(findOrCreateIntegrationPlatform(installCtx, c, 
operatorNamespace), "failed to create integration platform")
 
        log.Info("Starting the manager")
        exitOnError(mgr.Start(signals.SetupSignalHandler()), "manager exited 
non-zero")
 }
 
+// findOrCreateIntegrationPlatform create default integration platform in 
operator namespace if not already exists.
+func findOrCreateIntegrationPlatform(ctx context.Context, c client.Client, 
operatorNamespace string) error {

Review Comment:
   In rare cases the IntegrationPlatform that has been automatically installed 
with the operator may have been removed for some reason. In this case the trait 
will install a fresh IntegrationPlatform at integration runtime.



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