RichardW98 commented on code in PR #350:
URL: 
https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/350#discussion_r1469644674


##########
controllers/profiles/common/properties/properties.go:
##########
@@ -0,0 +1,49 @@
+// Copyright 2024 Apache Software Foundation (ASF)
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package properties
+
+import (
+       operatorapi 
"github.com/apache/incubator-kie-kogito-serverless-operator/api/v1alpha08"
+       
"github.com/apache/incubator-kie-kogito-serverless-operator/controllers/profiles/common/constants"
+       
"github.com/apache/incubator-kie-kogito-serverless-operator/controllers/workflowdef"
+       "github.com/magiconair/properties"
+       cncfmodel "github.com/serverlessworkflow/sdk-go/v2/model"
+)
+
+// GenerateKnativeEventingWorkflowProperties returns the set of application 
properties required for the workflow to produce or consume
+// Knative Events.
+// Never nil.
+func generateKnativeEventingWorkflowProperties(workflow 
*operatorapi.SonataFlow) (*properties.Properties, error) {
+       props := properties.NewProperties()
+       if workflow == nil || workflow.Spec.Sink == nil {
+               props.Set(constants.KnativeHealthEnabled, "false")
+               return props, nil
+       }
+       // verify ${K_SINK}
+       props.Set(constants.KnativeHealthEnabled, "true")

Review Comment:
   yes, this function will set it to false if Spec.Sink is nil, which means 
there'll be no sinkbinding to be create: 
https://github.com/apache/incubator-kie-kogito-serverless-operator/issues/368. 



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