wmedvede commented on code in PR #540:
URL: 
https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/540#discussion_r1805161648


##########
internal/controller/monitoring/monitoring.go:
##########
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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 monitoring
+
+import (
+       operatorapi 
"github.com/apache/incubator-kie-kogito-serverless-operator/api/v1alpha08"
+       "github.com/apache/incubator-kie-kogito-serverless-operator/utils"
+       "k8s.io/client-go/rest"
+)
+
+const (
+       prometheusGroup = "monitoring.coreos.com"
+)
+
+func GetPrometheusAvailability(cfg *rest.Config) (bool, error) {

Review Comment:
   I agree to keep things simple, for me it's fine, but we need to know what 
happens if we deploy a WF in a namespace that don't have the Prometheus 
operator installed, and which is the impact on users trying to produce 
deployments in these situation.
   
   Because, we are creating more and more k8s objects.
   Imagine the situation where the WF reconciliation stars, ok, we create the 
deployment, the service, the configmaps,  SinkBinding, eventually many 
Triggers, and then, when we reach the point to create the ServiceMonitior, 
something "exploits" because the Prometheus operator is not installed in that 
namespace.
   
   I'll check this case tomorrow.



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