tchughesiv commented on code in PR #372:
URL:
https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/372#discussion_r1474561065
##########
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:
yes, it is possible to have multiple platforms in a namespace, but only 1
platform will ever be considered "Active" in that namespace. Thus, we should
only ever use the "Active" ns when configuring services & workflows.
--
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]