lburgazzoli commented on a change in pull request #153: Support Knative 
broker/trigger model
URL: https://github.com/apache/camel-k-runtime/pull/153#discussion_r334387294
 
 

 ##########
 File path: 
camel-knative/camel-knative-api/src/main/java/org/apache/camel/component/knative/spi/KnativeEnvironment.java
 ##########
 @@ -53,24 +53,24 @@ public KnativeEnvironment(
         return services.stream();
     }
 
-    public Optional<KnativeServiceDefinition> lookupService(Knative.Type type, 
String name, String... aliases) {
+    public Optional<KnativeServiceDefinition> lookupService(Knative.Kind 
endpointType, Knative.Type type, String name, String... aliases) {
         return Stream.concat(Stream.of(name), Stream.of(aliases))
             .sequential()
-            .map(n -> lookup(type, n))
+            .map(n -> lookup(endpointType, type, n))
             .filter(Optional::isPresent)
             .map(Optional::get)
             .findFirst();
     }
 
-    public KnativeServiceDefinition mandatoryLookupService(Knative.Type type, 
String name) {
-        return lookupService(type, name).orElseThrow(
+    public KnativeServiceDefinition mandatoryLookupService(Knative.Kind 
endpointType, Knative.Type type, String name) {
 
 Review comment:
   Do we have cases in which we only have the `kind` set and not the 
`apiVersion` ?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to