ricardozanini commented on code in PR #367:
URL: 
https://github.com/apache/incubator-kie-kogito-serverless-operator/pull/367#discussion_r1475080422


##########
controllers/profiles/common/properties/discovery.go:
##########
@@ -99,6 +99,7 @@ func generateDiscoveryProperties(ctx context.Context, catalog 
discovery.ServiceC
                                        mpProperty := 
generateMicroprofileServiceCatalogProperty(plainUri)
                                        klog.V(log.I).Infof("Generating 
microprofile service catalog property %s=%s.", mpProperty, address)
                                        result.MustSet(mpProperty, address)
+                                       result.MustSet(k, 
"http://localhost:8080";)

Review Comment:
   @dmartinol we ditched the 
`addons-quarkus-fabric8-kubernetes-service-catalog` on purpose since we 
implemented the discovery in the operator, to not depend on Fabric8 and giving 
the pod unneeded permissions.
   
   That said, the underlying runtime now relies on smallrye mpconfig to do the 
"discovery", which is this props dictionary we mount in the CM. So now we use 
the [microprofile-config 
catalog](https://github.com/apache/incubator-kie-kogito-runtimes/tree/main/quarkus/addons/microprofile-config-service-catalog)
 instead.
   
   So in your example, our managed props take over `mta_ui`? Since we will have:
   
   User Properties:
   ```properties
   mta_ui = ${kubernetes:services.v1/openshift-mta/mta-ui?port=ui}
   quarkus.rest-client.mta_json.url = ${mta_ui}/hub
   ```
   Managed:
   ```properties
   
org.kie.kogito.addons.discovery.kubernetes\:services.v1\/openshift-mta\/mta-ui?port\=ui
 = http://mta-ui.openshift-mta.svc:8080
   mta_ui = http://mta-ui.openshift-mta.svc:8080
   ```
   
   Hence, `mta_ui` must override what's set on the user profile. It will 
probably work since the profile takes precedence, right?
   
   That will work considering we keep updating `mta_ui` on every reconciliation 
if a user changes their service endpoint.



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