ricardozanini commented on code in PR #540:
URL:
https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/540#discussion_r1804979642
##########
internal/controller/profiles/dev/states_dev.go:
##########
@@ -142,6 +151,14 @@ func (e *ensureRunningWorkflowState) Do(ctx
context.Context, workflow *operatora
return ctrl.Result{RequeueAfter: constants.RequeueAfterIsRunning},
objs, nil
}
+func (e *ensureRunningWorkflowState) ensureServiceMonitor(ctx context.Context,
workflow *operatorapi.SonataFlow, pl *operatorapi.SonataFlowPlatform)
(client.Object, error) {
+ if monitoring.IsMonitoringEnabled(pl) {
+ serviceMonitor, _, err := e.ensurers.serviceMonitor.Ensure(ctx,
workflow)
Review Comment:
We should always fail fast; otherwise, debugging will be hard.
That's a good story, @wmedvede. We can open a follow-up issue for this one.
Another option is to query the `/q/metrics` endpoint during the reconciliation
and fail there.
But we can extend the validation story to unpack the available extensions
and add them to the `.status.extensions: []`. This way, the operator can behave
differently depending on what's available. For instance, if the
`.spec.persistence` or `.spec.monitoring` attributes are defined, and there are
no extensions, we fail or warn in an event.
--
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]