This is an automated email from the ASF dual-hosted git repository.

astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 619c58a25a2cc9fa12b946cb688c40924b12c314
Author: Antonin Stefanutti <[email protected]>
AuthorDate: Tue Apr 13 16:05:04 2021 +0200

    fix(prometheus): Only add MP Metrics dependency during initialisation phase
---
 pkg/trait/prometheus.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pkg/trait/prometheus.go b/pkg/trait/prometheus.go
index df9124f..7a5a87d 100644
--- a/pkg/trait/prometheus.go
+++ b/pkg/trait/prometheus.go
@@ -70,10 +70,11 @@ func (t *prometheusTrait) Configure(e *Environment) (bool, 
error) {
        ), nil
 }
 
-func (t *prometheusTrait) Apply(e *Environment) (err error) {
+func (t *prometheusTrait) Apply(e *Environment) error {
        if e.IntegrationInPhase(v1.IntegrationPhaseInitialization) {
                // Add the Camel Quarkus MP Metrics extension
                util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies, 
"mvn:org.apache.camel.quarkus:camel-quarkus-microprofile-metrics")
+               return nil
        }
 
        container := e.getIntegrationContainer()

Reply via email to