jianrongzhang89 commented on code in PR #540:
URL:
https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/540#discussion_r1805258977
##########
internal/controller/profiles/common/object_creators.go:
##########
@@ -439,10 +443,37 @@ func UserPropsConfigMapCreator(workflow
*operatorapi.SonataFlow) (client.Object,
// ManagedPropsConfigMapCreator creates an empty ConfigMap to hold the
external application properties
func ManagedPropsConfigMapCreator(workflow *operatorapi.SonataFlow, platform
*operatorapi.SonataFlowPlatform) (client.Object, error) {
-
props, err := properties.ApplicationManagedProperties(workflow,
platform)
if err != nil {
return nil, err
}
return workflowproj.CreateNewManagedPropsConfigMap(workflow, props), nil
}
+
+// ServiceMonitorCreator is an ObjectsCreator for Service Monitor for the
workflow service.
+func ServiceMonitorCreator(workflow *operatorapi.SonataFlow) (client.Object,
error) {
+ lbl := workflowproj.GetMergedLabels(workflow)
+ spec := &prometheus.ServiceMonitorSpec{
+ Selector: metav1.LabelSelector{
+ MatchLabels: map[string]string{
Review Comment:
@wmedvede While label queries on k8s is "fast", the additional labels added
would require more computation. Since Prometheus scrapes metrics periodically,
this would cause unnecessary accumulative cost in production from time to time.
--
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]