claudio4j commented on a change in pull request #2577:
URL: https://github.com/apache/camel-k/pull/2577#discussion_r699560182



##########
File path: pkg/trait/route.go
##########
@@ -174,19 +196,83 @@ func (t *routeTrait) Apply(e *Environment) error {
        return nil
 }
 
-func (t *routeTrait) getTLSConfig() *routev1.TLSConfig {
+func (t *routeTrait) getTLSConfig() (*routev1.TLSConfig, error) {
+       // a certificate is a multiline text, but to set it as value in a 
single line in CLI, the user must escape the new line character as \\n
+       // but in the TLS configuration, the certificates should be a multiline 
string
+       // then we need to replace the incoming escaped new lines \\n for a 
real new line \n
+       key := strings.ReplaceAll(t.TLSKey, "\\n", "\n")

Review comment:
       The parameters ending in`secret` have higher priority and are used. I 
added a documentation about reading keys and certificates from local filesystem 
or `secret`. 




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


Reply via email to