jordigilh commented on code in PR #372:
URL:
https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/372#discussion_r1474468924
##########
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:
It's a global variable for the operator But yes, I should add another level
of abstraction to add the namespace.
Question: is it possible to have multiple platform CRs in the same
namespace? I don't think so, but asking to be sure.
--
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]