[GitHub] lburgazzoli commented on a change in pull request #261: Better Knative and Istio integration

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] lburgazzoli commented on a change in pull request #261: Better Knative and Istio integration

GitBox
lburgazzoli commented on a change in pull request #261: Better Knative and Istio integration
URL: https://github.com/apache/camel-k/pull/261#discussion_r239433280
 
 

 ##########
 File path: pkg/trait/debug.go
 ##########
 @@ -35,6 +35,14 @@ func (r *debugTrait) appliesTo(e *Environment) bool {
  return e.Integration != nil && e.Integration.Status.Phase == v1alpha1.IntegrationPhaseDeploying
 }
 
+func (r *debugTrait) autoconfigure(e *Environment) error {
+ if r.Enabled == nil {
+ enabled := false
+ r.Enabled = &enabled
+ }
+ return nil
+}
+
 
 Review comment:
   maybe this logic could be simple moved down to the apply method, something like:
   
   ```go
   if r.Enabled != nil && *r.Enabled {
       e.EnvVars["JAVA_DEBUG"] = True
   }
   ```

----------------------------------------------------------------
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:
[hidden email]


With regards,
Apache Git Services