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


##########
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:
   So, for this PR, can I assume that there's only 1 platform in the namespace? 
Or is it the general opinion that now it's the right time to add the logic to 
filter now in the `deploymentReconciler`? if I know where to look for 
(annotations, labels...) I can do it and use this new function. Alternativelly 
I can use the kube client to retrieve the first platform retrieved from calling 
`List()`. Thoughts?
   



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