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


##########
api/v1alpha08/sonataflowplatform_types.go:
##########
@@ -45,7 +45,23 @@ type SonataFlowPlatformSpec struct {
        // Only workflows without the `sonataflow.org/profile: dev` annotation 
will be configured to use these service(s).
        // Setting this will override the use of any cluster-scoped services 
that might be defined via `SonataFlowClusterPlatform`.
        // +optional
-       Services *ServicesPlatformSpec `json:"services,omitempty"`
+       Services ServicesPlatformSpec `json:"services,omitempty"`
+       // Persistence defines the platform persistence configuration. When 
this field is set,
+       // the configuration is used as the persistence for platform services 
and sonataflow instances
+       // that don't provide one of their own.
+       // +optional
+       Persistence *PersistencePlatformSpec `json:"persistence,omitempty"`
+}
+
+// PersistencePlatformSpec configures the DataBase support for both platform 
services and workflows. For services, it allows
+// configuring a generic database connectivity if the service does not come 
with its own configured. In case of workflows,
+// the operator will add the necessary JDBC properties to in the workflow's 
application.properties so that it can communicate
+// with the persistence service based on the spec provided here.
+// +optional
+type PersistencePlatformSpec struct {

Review Comment:
   I think `PersistenceOptionsSpec` makes more sense because this is used in 
both the platform and workflow objects.



##########
api/v1alpha08/sonataflowplatform_services_types.go:
##########
@@ -32,61 +32,8 @@ type ServiceSpec struct {
        Enabled *bool `json:"enabled,omitempty"`
        // Persists service to a datasource of choice. Ephemeral by default.
        // +optional
-       Persistence *PersistenceOptions `json:"persistence,omitempty"`
+       Persistence *PersistencePlatformSpec `json:"persistence,omitempty"`
        // PodTemplate describes the deployment details of this platform 
service instance.
        
//+operator-sdk:csv:customresourcedefinitions:type=spec,displayName="podTemplate"
        PodTemplate PodTemplateSpec `json:"podTemplate,omitempty"`
 }
-
-// PersistenceOptions configure the services to persist to a datasource of 
choice
-// +kubebuilder:validation:MaxProperties=1

Review Comment:
   it's ok to rename this but this CRD schema validation config should be 
brought over to the new struct. this is critical going forward as additional 
persistence types are added. a user should only be allowed to select one at a 
given time.



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