nicolaferraro commented on a change in pull request #235: Support for multiple 
integration definitions
URL: https://github.com/apache/camel-k/pull/235#discussion_r235685779
 
 

 ##########
 File path: pkg/trait/knative.go
 ##########
 @@ -72,14 +74,26 @@ func (t *knativeTrait) getServiceFor(e *environment) 
*serving.Service {
        // environment has the priority
        environment := CombineConfigurationAsMap("env", e.Context, 
e.Integration)
 
+       sources := make([]string, 0, len(e.Integration.Spec.Sources))
+       for i, s := range e.Integration.Spec.Sources {
+               envName := fmt.Sprintf("KAMEL_K_ROUTE_%03d", i)
+               environment[envName] = s.Content
+
+               src := fmt.Sprintf("env:%s", envName)
+               if s.Language != "" {
+                       src = src + "?language=" + string(s.Language)
+               }
+
+               sources = append(sources, src)
+       }
+
        // set env vars needed by the runtime
        environment["JAVA_MAIN_CLASS"] = "org.apache.camel.k.jvm.Application"
 
        // camel-k runtime
-       environment["CAMEL_K_ROUTES_URI"] = "inline:" + 
e.Integration.Spec.Source.Content
 
 Review comment:
   Appreciate :+1:, I didn't like "inline:"! 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to