tchughesiv commented on code in PR #372:
URL:
https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/372#discussion_r1484720547
##########
controllers/profiles/common/object_creators.go:
##########
@@ -161,13 +149,34 @@ func defaultContainer(workflow *operatorapi.SonataFlow)
(*corev1.Container, erro
if err := mergo.Merge(defaultFlowContainer,
workflow.Spec.PodTemplate.Container.ToContainer(), mergo.WithOverride); err !=
nil {
return nil, err
}
- defaultFlowContainer = ConfigurePersistence(defaultFlowContainer,
workflow.Spec.Persistence, defaultSchemaName, workflow.Namespace)
+ if workflow.Spec.Persistence != nil {
+ c := workflow.Spec.Persistence
+ if c.PostgreSQL == nil && plf.Spec.Persistence != nil {
+ c = &operatorapi.PersistenceOptionsSpec{}
+ if plf.Spec.Persistence.PostgreSQL != nil {
+ c.PostgreSQL =
&operatorapi.PersistencePostgreSQL{
+ SecretRef:
plf.Spec.Persistence.PostgreSQL.SecretRef,
+ JdbcUrl:
plf.Spec.Persistence.PostgreSQL.JdbcUrl,
Review Comment:
maybe we should add an `if len(plf.Spec.Persistence.PostgreSQL.JdbcUrl) > 0`
check here first? to ensure we're not breaking the MaxItems CRD validation here?
--
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]