wmedvede commented on code in PR #540:
URL:
https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/540#discussion_r1806522578
##########
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:
My last comment on this PR guys.
Feel free to open a follow up issue if you believe makes sense.
**case1:**
I have brand new OpenShift Local installation.
I never installed the Prometheus operator
I create a SFP with spec.monitoring.enabled = true
I create a WF in namespace test
After the WF deployment I can see a ServiceMonitor monitor created for it,
weird.
Only explanation is that OpenShift Local already has the operator installed
the Prometheus resources ouf-of-the-box
In customer OpenShfift cluster installations different thant OpenShift Local
installations IDK what will happen. Probably the operator is always there.
**case2:**
I install the Prometheus operator in namespace test1
I create a SFP, with spec.monitoring.enabled = true
I create, a WF, etc,
I can see the ServiceMonitior, etc.
I create a namespace test2, I don't install the Prometheus operator in that
namespace.
I create a SFP, with spec.monitoring.enabled = true
I create, a WF, etc,
I can see that a ServiceMonitior, etc.
Sort of corolary o case1
--
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]