This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit e2cb3f02d177f9d68925fac75879a807f466dde2 Author: nferraro <ni.ferr...@gmail.com> AuthorDate: Thu Dec 6 12:42:09 2018 +0100 Disable debug by default and add doc --- docs/traits.adoc | 7 +++++++ pkg/trait/debug.go | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/docs/traits.adoc b/docs/traits.adoc index 5b91a80..5e638a2 100644 --- a/docs/traits.adoc +++ b/docs/traits.adoc @@ -144,6 +144,13 @@ The following is a list of common traits that can be configured by the end users !=== +| debug +| All +| Run the integration in debug mode (you can port-forward to port 5005 to connect) + + + + + It's disabled by default. + |======================= diff --git a/pkg/trait/debug.go b/pkg/trait/debug.go index f74896f..e5e40d9 100644 --- a/pkg/trait/debug.go +++ b/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 +} + func (r *debugTrait) apply(e *Environment) error { // this is all that's needed as long as the base image is `fabric8/s2i-java` look into builder/builder.go e.EnvVars["JAVA_DEBUG"] = True