You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2018/12/06 16:06:53 UTC
[camel-k] 06/06: Disable debug by default and add doc
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...@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