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

 ##########
 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:
   Well, the reason why there's a autoconfigure method is mostly because it 
will be nice in the future to save back in the Integration status (or in the 
logs) the actual trait configuration used in order to speed-up troubleshooting. 
Changing it to false in the `autoconfigure` method already allows to determine 
if the trait code (`apply`) has been executed.

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