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


##########
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"`

Review Comment:
   this should not be changed. please revert this back to a pointer object. it 
is critical that this be a pointer object in order for the cluster-wide 
services logic to work as expected.
   
   why are we making changes to this? it has nothing to do w/ the PR.



##########
config/manager/kustomization.yaml:
##########
@@ -16,7 +16,7 @@ apiVersion: kustomize.config.k8s.io/v1beta1
 kind: Kustomization
 images:
 - name: controller
-  newName: quay.io/kiegroup/kogito-serverless-operator-nightly

Review Comment:
   please revert this change



##########
controllers/platform/services/properties_services_test.go:
##########
@@ -208,9 +199,6 @@ func emptyDataIndexServiceSpec() plfmOptionFn {
 
 func emptyJobServiceSpec() plfmOptionFn {
        return func(p *operatorapi.SonataFlowPlatform) {
-               if p.Spec.Services == nil {
-                       p.Spec.Services = &operatorapi.ServicesPlatformSpec{}
-               }

Review Comment:
   same



##########
controllers/platform/services/properties_services_test.go:
##########
@@ -185,9 +182,6 @@ func setJobServiceEnabledValue(v *bool) plfmOptionFn {
 
 func setDataIndexEnabledValue(v *bool) plfmOptionFn {
        return func(p *operatorapi.SonataFlowPlatform) {
-               if p.Spec.Services == nil {
-                       p.Spec.Services = &operatorapi.ServicesPlatformSpec{}
-               }

Review Comment:
   same



##########
controllers/platform/platformutils.go:
##########
@@ -111,15 +111,13 @@ func setPlatformDefaults(p 
*operatorapi.SonataFlowPlatform, verbose bool) error
        }
 
        // When dataIndex object set, default to enabled if bool not set
-       if p.Spec.Services != nil {
-               var enable = true
-               if p.Spec.Services.DataIndex != nil && 
p.Spec.Services.DataIndex.Enabled == nil {
-                       p.Spec.Services.DataIndex.Enabled = &enable
-               }
-               // When the JobService field has a value, default to enabled if 
the `Enabled` field's value is nil
-               if p.Spec.Services.JobService != nil && 
p.Spec.Services.JobService.Enabled == nil {
-                       p.Spec.Services.JobService.Enabled = &enable
-               }

Review Comment:
   please revert these changes



##########
controllers/platform/services/properties_services_test.go:
##########
@@ -231,36 +219,30 @@ func setPlatformName(name string) plfmOptionFn {
 
 func setJobServiceJDBC(jdbc string) plfmOptionFn {
        return func(p *operatorapi.SonataFlowPlatform) {
-               if p.Spec.Services == nil {
-                       p.Spec.Services = &operatorapi.ServicesPlatformSpec{}
-               }

Review Comment:
   same



##########
controllers/platform/services/properties_services_test.go:
##########
@@ -173,9 +173,6 @@ func generatePlatform(opts ...plfmOptionFn) 
*operatorapi.SonataFlowPlatform {
 
 func setJobServiceEnabledValue(v *bool) plfmOptionFn {
        return func(p *operatorapi.SonataFlowPlatform) {
-               if p.Spec.Services == nil {
-                       p.Spec.Services = &operatorapi.ServicesPlatformSpec{}
-               }

Review Comment:
   revert



##########
controllers/platform/services/properties_services_test.go:
##########
@@ -197,9 +191,6 @@ func setDataIndexEnabledValue(v *bool) plfmOptionFn {
 
 func emptyDataIndexServiceSpec() plfmOptionFn {
        return func(p *operatorapi.SonataFlowPlatform) {
-               if p.Spec.Services == nil {
-                       p.Spec.Services = &operatorapi.ServicesPlatformSpec{}
-               }

Review Comment:
   same



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