tchughesiv commented on code in PR #372:
URL:
https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/372#discussion_r1474626385
##########
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:
If you think you need to retrieve the active platform, this should be done
w/ the existing function `GetActivePlatform`...
https://github.com/apache/incubator-kie-kogito-serverless-operator/blob/27c0542985639c5f49a269e6b79b5c3cd5c4b6d6/controllers/platform/platform.go#L121-L156
--
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]