jianrongzhang89 commented on code in PR #558:
URL:
https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/558#discussion_r1823193473
##########
internal/controller/platform/services/services.go:
##########
@@ -582,18 +583,23 @@ func (d *DataIndexHandler) newTrigger(labels
map[string]string, brokerName, name
},
}
}
-func (d *DataIndexHandler) GenerateKnativeResources(platform
*operatorapi.SonataFlowPlatform, lbl map[string]string) ([]client.Object,
error) {
+func (d *DataIndexHandler) GenerateKnativeResources(platform
*operatorapi.SonataFlowPlatform, lbl map[string]string) ([]client.Object,
*corev1.Event, error) {
broker := d.GetSourceBroker()
if broker == nil || len(broker.Ref.Name) == 0 {
- return nil, nil // Nothing to do
+ return nil, nil, nil // Nothing to do
}
brokerName := broker.Ref.Name
namespace := broker.Ref.Namespace
if len(namespace) == 0 {
namespace = platform.Namespace
}
if err := knative.ValidateBroker(brokerName, namespace); err != nil {
- return nil, err
+ event := &corev1.Event{
+ Type: corev1.EventTypeWarning,
+ Reason: WaitingKnativeEventing,
+ Message: err.Error(),
Review Comment:
Thank you @wmedvede for the suggestion. This sounds good to me. Code is
updated.
--
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]