tchughesiv commented on code in PR #372:
URL: 
https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/372#discussion_r1474597044


##########
controllers/profiles/common/object_creators.go:
##########
@@ -218,10 +226,20 @@ func WorkflowPropsConfigMapCreator(workflow 
*operatorapi.SonataFlow) (client.Obj
        return workflowproj.CreateNewAppPropsConfigMap(workflow, props), nil
 }
 
-func ConfigurePersistence(serviceContainer *corev1.Container, options 
*operatorapi.PersistenceOptions, defaultSchema, namespace string) 
*corev1.Container {
+func ConfigurePersistence(serviceContainer *corev1.Container, config 
*operatorapi.PersistenceOptions, defaultSchema, namespace string) 
(*corev1.Container, error) {
+       if config == nil {
+               return serviceContainer, nil
+       }
        c := serviceContainer.DeepCopy()
-       if options != nil && options.PostgreSql != nil {
-               c.Env = append(c.Env, 
persistence.ConfigurePostgreSqlEnv(options.PostgreSql, defaultSchema, 
namespace)...)
+
+       if config.PostgreSql != nil {
+               c.Env = append(c.Env, 
persistence.ConfigurePostgreSQLEnv(config.PostgreSql, defaultSchema, 
namespace)...)
+               return c, nil
+       }
+       p := persistence.WorkflowConfig.GetPostgreSQLConfiguration()

Review Comment:
   This is merely means the platform object has not been marked as "Duplicated" 
in its status. Additional platforms added to a namespace will be marked as such 
and do not progress through the full reconciliation process. 
   
   if you need to retrieve the active platform, there should be a 
GetActivePlatform function you can use. Or, hopefully you can just use the 
service handlers, which will alrewady have the active platform attached to the 
interface... e.g. `d.platform`



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to