You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by as...@apache.org on 2021/01/28 17:48:03 UTC

[camel-k] branch master updated (c06ef01 -> 5817d05)

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

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


    from c06ef01  fix(trait): using proper contentKey for sources
     new 201f6ab  chore(prometheus): Remove runtime provider API use from the Prometheus trait
     new baf7c6f  chore(prometheus): Remove Prometheus JMX exporter configuration from the Prometheus trait
     new 05ba437  chore(prometheus): Remove Quarkus references from the Prometheus trait documentation
     new 5817d05  chore(e2e): Remove Quarkus trait configuration from monitoring e2e test

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 deploy/prometheus-jmx-exporter.yaml        | 603 -----------------------------
 deploy/resources.go                        |   8 -
 deploy/traits.yaml                         |   5 +-
 docs/modules/traits/pages/prometheus.adoc  |  10 +-
 e2e/yaks/openshift/monitoring/Metrics.java |   2 +-
 pkg/trait/prometheus.go                    |  60 +--
 6 files changed, 10 insertions(+), 678 deletions(-)
 delete mode 100644 deploy/prometheus-jmx-exporter.yaml


[camel-k] 04/04: chore(e2e): Remove Quarkus trait configuration from monitoring e2e test

Posted by as...@apache.org.
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 5817d05252bd3065c11e21833a7365afdcb59bfa
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Thu Jan 28 17:30:49 2021 +0100

    chore(e2e): Remove Quarkus trait configuration from monitoring e2e test
---
 e2e/yaks/openshift/monitoring/Metrics.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/e2e/yaks/openshift/monitoring/Metrics.java b/e2e/yaks/openshift/monitoring/Metrics.java
index 203e1f8..38c423f 100644
--- a/e2e/yaks/openshift/monitoring/Metrics.java
+++ b/e2e/yaks/openshift/monitoring/Metrics.java
@@ -1,4 +1,4 @@
-// camel-k: language=java trait=quarkus.enabled=true trait=prometheus.enabled=true
+// camel-k: language=java trait=prometheus.enabled=true
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more


[camel-k] 03/04: chore(prometheus): Remove Quarkus references from the Prometheus trait documentation

Posted by as...@apache.org.
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 05ba4375f7ed01493b7c0d2b1dfb2c5ab8f45078
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Thu Jan 28 17:09:02 2021 +0100

    chore(prometheus): Remove Quarkus references from the Prometheus trait documentation
---
 deploy/traits.yaml                        | 2 +-
 docs/modules/traits/pages/prometheus.adoc | 4 +---
 pkg/trait/prometheus.go                   | 6 ++----
 3 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/deploy/traits.yaml b/deploy/traits.yaml
index f130ae1..cb0bbc9 100755
--- a/deploy/traits.yaml
+++ b/deploy/traits.yaml
@@ -502,7 +502,7 @@ traits:
   - Kubernetes
   - Knative
   - OpenShift
-  description: 'The Prometheus trait configures a Prometheus-compatible endpoint. This trait also exposes the integration with `Service` and `ServiceMonitor` resources, so that the endpoint can be scraped automatically, when using the Prometheus Operator. The metrics exposed vary depending on the configured runtime. With the default Quarkus runtime, metrics are exposed using MicroProfile Metrics. While with the Java main runtime, metrics are exposed using the Prometheus JMX exporter. WAR [...]
+  description: 'The Prometheus trait configures a Prometheus-compatible endpoint. This trait also exposes the integration with `Service` and `ServiceMonitor` resources, so that the endpoint can be scraped automatically, when using the Prometheus Operator. The metrics are exposed using MicroProfile Metrics. WARNING: The creation of the `ServiceMonitor` resource requires the https://github.com/coreos/prometheus-operator[Prometheus Operator] custom resource definition to be installed. You c [...]
   properties:
   - name: enabled
     type: bool
diff --git a/docs/modules/traits/pages/prometheus.adoc b/docs/modules/traits/pages/prometheus.adoc
index 6ab4ef9..1bc57ac 100755
--- a/docs/modules/traits/pages/prometheus.adoc
+++ b/docs/modules/traits/pages/prometheus.adoc
@@ -5,9 +5,7 @@ The Prometheus trait configures a Prometheus-compatible endpoint. This trait als
 `Service` and `ServiceMonitor` resources, so that the endpoint can be scraped automatically, when using the
 Prometheus Operator.
 
-The metrics exposed vary depending on the configured runtime. With the default Quarkus runtime, metrics are
-exposed using MicroProfile Metrics. While with the Java main runtime, metrics are exposed using the Prometheus
-JMX exporter.
+The metrics are exposed using MicroProfile Metrics.
 
 WARNING: The creation of the `ServiceMonitor` resource requires the https://github.com/coreos/prometheus-operator[Prometheus Operator]
 custom resource definition to be installed.
diff --git a/pkg/trait/prometheus.go b/pkg/trait/prometheus.go
index 40e994c..6c4ffcb 100644
--- a/pkg/trait/prometheus.go
+++ b/pkg/trait/prometheus.go
@@ -31,12 +31,10 @@ import (
 )
 
 // The Prometheus trait configures a Prometheus-compatible endpoint. This trait also exposes the integration with
-//`Service` and `ServiceMonitor` resources, so that the endpoint can be scraped automatically, when using the
+// `Service` and `ServiceMonitor` resources, so that the endpoint can be scraped automatically, when using the
 // Prometheus Operator.
 //
-// The metrics exposed vary depending on the configured runtime. With the default Quarkus runtime, metrics are
-// exposed using MicroProfile Metrics. While with the Java main runtime, metrics are exposed using the Prometheus
-// JMX exporter.
+// The metrics are exposed using MicroProfile Metrics.
 //
 // WARNING: The creation of the `ServiceMonitor` resource requires the https://github.com/coreos/prometheus-operator[Prometheus Operator]
 // custom resource definition to be installed.


[camel-k] 02/04: chore(prometheus): Remove Prometheus JMX exporter configuration from the Prometheus trait

Posted by as...@apache.org.
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 baf7c6f1e293f232476760c9d80491d5e02e8210
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Thu Jan 28 17:04:23 2021 +0100

    chore(prometheus): Remove Prometheus JMX exporter configuration from the Prometheus trait
---
 deploy/prometheus-jmx-exporter.yaml       | 603 ------------------------------
 deploy/resources.go                       |   8 -
 deploy/traits.yaml                        |   3 -
 docs/modules/traits/pages/prometheus.adoc |   6 -
 pkg/trait/prometheus.go                   |  38 +-
 5 files changed, 1 insertion(+), 657 deletions(-)

diff --git a/deploy/prometheus-jmx-exporter.yaml b/deploy/prometheus-jmx-exporter.yaml
deleted file mode 100644
index c73f818..0000000
--- a/deploy/prometheus-jmx-exporter.yaml
+++ /dev/null
@@ -1,603 +0,0 @@
-# ---------------------------------------------------------------------------
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# ---------------------------------------------------------------------------
-
-startDelaySecs: 5
-ssl: false
-blacklistObjectNames: ["java.lang:*"]
-rules:
-  # Context level
-  - pattern: 'org.apache.camel<context=([^,]+), type=context, name="([^"]+)"><>ExchangesCompleted'
-    name: org.apache.camel.ExchangesCompleted
-    help: Exchanges Completed
-    type: COUNTER
-    labels:
-      context: $1
-      type: context
-  - pattern: 'org.apache.camel<context=([^,]+), type=context, name="([^"]+)"><>ExchangesFailed'
-    name: org.apache.camel.ExchangesFailed
-    help: Exchanges Failed
-    type: COUNTER
-    labels:
-      context: $1
-      type: context
-  - pattern: 'org.apache.camel<context=([^,]+), type=context, name="([^"]+)"><>ExchangesInflight'
-    name: org.apache.camel.ExchangesInflight
-    help: Exchanges Inflight
-    type: COUNTER
-    labels:
-      context: $1
-      type: context
-  - pattern: 'org.apache.camel<context=([^,]+), type=context, name="([^"]+)"><>ExchangesTotal'
-    name: org.apache.camel.ExchangesTotal
-    help: Exchanges Total
-    type: COUNTER
-    labels:
-      context: $1
-      type: context
-  - pattern: 'org.apache.camel<context=([^,]+), type=context, name="([^"]+)"><>ExchangesTotal'
-    name: org.apache.camel.ExchangesTotal
-    help: Exchanges Total
-    type: COUNTER
-    labels:
-      context: $1
-      type: context
-  - pattern: 'org.apache.camel<context=([^,]+), type=context, name="([^"]+)"><>FailuresHandled'
-    name: org.apache.camel.FailuresHandled
-    help: Failures Handled
-    labels:
-      context: $1
-      type: context
-    type: COUNTER
-  - pattern: 'org.apache.camel<context=([^,]+), type=context, name="([^"]+)"><>ExternalRedeliveries'
-    name: org.apache.camel.ExternalRedeliveries
-    help: External Redeliveries
-    labels:
-      context: $1
-      type: context
-    type: COUNTER
-  - pattern: 'org.apache.camel<context=([^,]+), type=context, name="([^"]+)"><>MaxProcessingTime'
-    name: org.apache.camel.MaxProcessingTime
-    help: Maximum Processing Time
-    labels:
-      context: $1
-      type: context
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=context, name="([^"]+)"><>MeanProcessingTime'
-    name: org.apache.camel.MeanProcessingTime
-    help: Mean Processing Time
-    labels:
-      context: $1
-      type: context
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=context, name="([^"]+)"><>MinProcessingTime'
-    name: org.apache.camel.MinProcessingTime
-    help: Minimum Processing Time
-    labels:
-      context: $1
-      type: context
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=context, name="([^"]+)"><>LastProcessingTime'
-    name: org.apache.camel.LastProcessingTime
-    help: Last Processing Time
-    labels:
-      context: $1
-      type: context
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=context, name="([^"]+)"><>DeltaProcessingTime'
-    name: org.apache.camel.DeltaProcessingTime
-    help: Delta Processing Time
-    labels:
-      context: $1
-      type: context
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=context, name="([^"]+)"><>Redeliveries'
-    name: org.apache.camel.Redeliveries
-    help: Redeliveries
-    labels:
-      context: $1
-      type: context
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=context, name="([^"]+)"><>TotalProcessingTime'
-    name: org.apache.camel.TotalProcessingTime
-    help: Total Processing Time
-    labels:
-      context: $1
-      type: context
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=consumers, name="([^"]+)"><>InflightExchanges'
-    name: org.apache.camel.InflightExchanges
-    help: Inflight Exchanges
-    labels:
-      context: $1
-      type: context
-    type: GAUGE
-
-
-  # Route level
-  - pattern: 'org.apache.camel<context=([^,]+), type=routes, name="([^"]+)"><>ExchangesCompleted'
-    name: org.apache.camel.ExchangesCompleted
-    help: Exchanges Completed
-    type: COUNTER
-    labels:
-      context: $1
-      route: $2
-      type: routes
-  - pattern: 'org.apache.camel<context=([^,]+), type=routes, name="([^"]+)"><>ExchangesFailed'
-    name: org.apache.camel.ExchangesFailed
-    help: Exchanges Failed
-    type: COUNTER
-    labels:
-      context: $1
-      route: $2
-      type: routes
-  - pattern: 'org.apache.camel<context=([^,]+), type=routes, name="([^"]+)"><>ExchangesInflight'
-    name: org.apache.camel.ExchangesInflight
-    help: Exchanges Inflight
-    type: COUNTER
-    labels:
-      context: $1
-      route: $2
-      type: routes
-  - pattern: 'org.apache.camel<context=([^,]+), type=routes, name="([^"]+)"><>ExchangesTotal'
-    name: org.apache.camel.ExchangesTotal
-    help: Exchanges Total
-    type: COUNTER
-    labels:
-      context: $1
-      route: $2
-      type: routes
-  - pattern: 'org.apache.camel<context=([^,]+), type=routes, name="([^"]+)"><>ExchangesTotal'
-    name: org.apache.camel.ExchangesTotal
-    help: Exchanges Total
-    type: COUNTER
-    labels:
-      context: $1
-      route: $2
-      type: routes
-  - pattern: 'org.apache.camel<context=([^,]+), type=routes, name="([^"]+)"><>FailuresHandled'
-    name: org.apache.camel.FailuresHandled
-    help: Failures Handled
-    labels:
-      context: $1
-      route: $2
-      type: routes
-    type: COUNTER
-  - pattern: 'org.apache.camel<context=([^,]+), type=routes, name="([^"]+)"><>ExternalRedeliveries'
-    name: org.apache.camel.ExternalRedeliveries
-    help: External Redeliveries
-    labels:
-      context: $1
-      route: $2
-      type: routes
-    type: COUNTER
-  - pattern: 'org.apache.camel<context=([^,]+), type=routes, name="([^"]+)"><>MaxProcessingTime'
-    name: org.apache.camel.MaxProcessingTime
-    help: Maximum Processing Time
-    labels:
-      context: $1
-      route: $2
-      type: routes
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=routes, name="([^"]+)"><>MeanProcessingTime'
-    name: org.apache.camel.MeanProcessingTime
-    help: Mean Processing Time
-    labels:
-      context: $1
-      route: $2
-      type: routes
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=routes, name="([^"]+)"><>MinProcessingTime'
-    name: org.apache.camel.MinProcessingTime
-    help: Minimum Processing Time
-    labels:
-      context: $1
-      route: $2
-      type: routes
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=routes, name="([^"]+)"><>LastProcessingTime'
-    name: org.apache.camel.LastProcessingTime
-    help: Last Processing Time
-    labels:
-      context: $1
-      route: $2
-      type: routes
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=routes, name="([^"]+)"><>DeltaProcessingTime'
-    name: org.apache.camel.DeltaProcessingTime
-    help: Delta Processing Time
-    labels:
-      context: $1
-      route: $2
-      type: routes
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=routes, name="([^"]+)"><>Redeliveries'
-    name: org.apache.camel.Redeliveries
-    help: Redeliveries
-    labels:
-      context: $1
-      route: $2
-      type: routes
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=routes, name="([^"]+)"><>TotalProcessingTime'
-    name: org.apache.camel.TotalProcessingTime
-    help: Total Processing Time
-    labels:
-      context: $1
-      route: $2
-      type: routes
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=routes, name="([^"]+)"><>InflightExchanges'
-    name: org.apache.camel.InflightExchanges
-    help: Inflight Exchanges
-    labels:
-      context: $1
-      route: $2
-      type: routes
-    type: GAUGE
-
-  # Processor level
-  - pattern: 'org.apache.camel<context=([^,]+), type=processors, name="([^"]+)"><>ExchangesCompleted'
-    name: org.apache.camel.ExchangesCompleted
-    help: Exchanges Completed
-    type: COUNTER
-    labels:
-      context: $1
-      processor: $2
-      type: processors
-  - pattern: 'org.apache.camel<context=([^,]+), type=processors, name="([^"]+)"><>ExchangesFailed'
-    name: org.apache.camel.ExchangesFailed
-    help: Exchanges Failed
-    type: COUNTER
-    labels:
-      context: $1
-      processor: $2
-      type: processors
-  - pattern: 'org.apache.camel<context=([^,]+), type=processors, name="([^"]+)"><>ExchangesInflight'
-    name: org.apache.camel.ExchangesInflight
-    help: Exchanges Inflight
-    type: COUNTER
-    labels:
-      context: $1
-      processor: $2
-      type: processors
-  - pattern: 'org.apache.camel<context=([^,]+), type=processors, name="([^"]+)"><>ExchangesTotal'
-    name: org.apache.camel.ExchangesTotal
-    help: Exchanges Total
-    type: COUNTER
-    labels:
-      context: $1
-      processor: $2
-      type: processors
-  - pattern: 'org.apache.camel<context=([^,]+), type=processors, name="([^"]+)"><>ExchangesTotal'
-    name: org.apache.camel.ExchangesTotal
-    help: Exchanges Total
-    type: COUNTER
-    labels:
-      context: $1
-      processor: $2
-      type: processors
-  - pattern: 'org.apache.camel<context=([^,]+), type=processors, name="([^"]+)"><>FailuresHandled'
-    name: org.apache.camel.FailuresHandled
-    help: Failures Handled
-    labels:
-      context: $1
-      processor: $2
-      type: processors
-    type: COUNTER
-  - pattern: 'org.apache.camel<context=([^,]+), type=processors, name="([^"]+)"><>ExternalRedeliveries'
-    name: org.apache.camel.ExternalRedeliveries
-    help: External Redeliveries
-    labels:
-      context: $1
-      processor: $2
-      type: processors
-    type: COUNTER
-  - pattern: 'org.apache.camel<context=([^,]+), type=processors, name="([^"]+)"><>MaxProcessingTime'
-    name: org.apache.camel.MaxProcessingTime
-    help: Maximum Processing Time
-    labels:
-      context: $1
-      processor: $2
-      type: processors
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=processors, name="([^"]+)"><>MeanProcessingTime'
-    name: org.apache.camel.MeanProcessingTime
-    help: Mean Processing Time
-    labels:
-      context: $1
-      processor: $2
-      type: processors
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=processors, name="([^"]+)"><>MinProcessingTime'
-    name: org.apache.camel.MinProcessingTime
-    help: Minimum Processing Time
-    labels:
-      context: $1
-      processor: $2
-      type: processors
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=processors, name="([^"]+)"><>LastProcessingTime'
-    name: org.apache.camel.LastProcessingTime
-    help: Last Processing Time
-    labels:
-      context: $1
-      processor: $2
-      type: processors
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=processors, name="([^"]+)"><>DeltaProcessingTime'
-    name: org.apache.camel.DeltaProcessingTime
-    help: Delta Processing Time
-    labels:
-      context: $1
-      processor: $2
-      type: processors
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=processors, name="([^"]+)"><>Redeliveries'
-    name: org.apache.camel.Redeliveries
-    help: Redeliveries
-    labels:
-      context: $1
-      processor: $2
-      type: processors
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=processors, name="([^"]+)"><>TotalProcessingTime'
-    name: org.apache.camel.TotalProcessingTime
-    help: Total Processing Time
-    labels:
-      context: $1
-      processor: $2
-      type: processors
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=processors, name="([^"]+)"><>InflightExchanges'
-    name: org.apache.camel.InflightExchanges
-    help: Inflight Exchanges
-    labels:
-      context: $1
-      processor: $2
-      type: processors
-    type: COUNTER
-
-  # Consumers
-  - pattern: 'org.apache.camel<context=([^,]+), type=consumers, name="([^"]+)"><>InflightExchanges'
-    name: org.apache.camel.InflightExchanges
-    help: Inflight Exchanges
-    labels:
-      context: $1
-      consumer: $2
-      type: consumers
-    type: GAUGE
-
-  # Services
-  - pattern: 'org.apache.camel<context=([^,]+), type=services, name="([^"]+)"><>MaxDuration'
-    name: org.apache.camel.MaxDuration
-    help: Maximum Duration
-    labels:
-      context: $1
-      service: $2
-      type: services
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=services, name="([^"]+)"><>MeanDuration'
-    name: org.apache.camel.MeanDuration
-    help: Mean Duration
-    labels:
-      context: $1
-      service: $2
-      type: services
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=services, name="([^"]+)"><>MinDuration'
-    name: org.apache.camel.MinDuration
-    help: Minimum Duration
-    labels:
-      context: $1
-      service: $2
-      type: services
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=services, name="([^"]+)"><>TotalDuration'
-    name: org.apache.camel.TotalDuration
-    help: Total Duration
-    labels:
-      context: $1
-      service: $2
-      type: services
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=services, name="([^"]+)"><>ThreadsBlocked'
-    name: org.apache.camel.ThreadsBlocked
-    help: Threads Blocked
-    labels:
-      context: $1
-      service: $2
-      type: services
-    type: GAUGE
-  - pattern: 'org.apache.camel<context=([^,]+), type=services, name="([^"]+)"><>ThreadsInterrupted'
-    name: org.apache.camel.ThreadsInterrupted
-    help: Threads Interrupted
-    labels:
-      context: $1
-      service: $2
-      type: services
-    type: GAUGE
-  - pattern: 'org.apache.cxf<bus.id=([^,]+), type=([^,]+), service=([^,]+), port=([^,]+), operation=([^,]+)><>NumLogicalRuntimeFaults'
-    name: org.apache.cxf.NumLogicalRuntimeFaults
-    help: Number of logical runtime faults
-    type: GAUGE
-    labels:
-      bus.id: $1
-      type: $2
-      service: $3
-      port: $4
-      operation: $5
-  - pattern: 'org.apache.cxf<bus.id=([^,]+), type=([^,]+), service=([^,]+), port=([^,]+)><>NumLogicalRuntimeFaults'
-    name: org.apache.cxf.NumLogicalRuntimeFaults
-    help: Number of logical runtime faults
-    type: GAUGE
-    labels:
-      bus.id: $1
-      type: $2
-      service: $3
-      port: $4
-  - pattern: 'org.apache.cxf<bus.id=([^,]+), type=([^,]+), service=([^,]+), port=([^,]+), operation=([^,]+)><>AvgResponseTime'
-    name: org.apache.cxf.AvgResponseTime
-    help: Average Response Time
-    type: GAUGE
-    labels:
-      bus.id: $1
-      type: $2
-      service: $3
-      port: $4
-      operation: $5
-  - pattern: 'org.apache.cxf<bus.id=([^,]+), type=([^,]+), service=([^,]+), port=([^,]+)><>AvgResponseTime'
-    name: org.apache.cxf.AvgResponseTime
-    help: Average Response Time
-    type: GAUGE
-    labels:
-      bus.id: $1
-      type: $2
-      service: $3
-      port: $4
-  - pattern: 'org.apache.cxf<bus.id=([^,]+), type=([^,]+), service=([^,]+), port=([^,]+), operation=([^,]+)><>NumInvocations'
-    name: org.apache.cxf.NumInvocations
-    help: Number of invocations
-    type: GAUGE
-    labels:
-      bus.id: $1
-      type: $2
-      service: $3
-      port: $4
-      operation: $5
-  - pattern: 'org.apache.cxf<bus.id=([^,]+), type=([^,]+), service=([^,]+), port=([^,]+)><>NumInvocations'
-    name: org.apache.cxf.NumInvocations
-    help: Number of invocations
-    type: GAUGE
-    labels:
-      bus.id: $1
-      type: $2
-      service: $3
-      port: $4
-  - pattern: 'org.apache.cxf<bus.id=([^,]+), type=([^,]+), service=([^,]+), port=([^,]+), operation=([^,]+)><>MaxResponseTime'
-    name: org.apache.cxf.MaxResponseTime
-    help: Maximum Response Time
-    type: GAUGE
-    labels:
-      bus.id: $1
-      type: $2
-      service: $3
-      port: $4
-      operation: $5
-  - pattern: 'org.apache.cxf<bus.id=([^,]+), type=([^,]+), service=([^,]+), port=([^,]+)><>MaxResponseTime'
-    name: org.apache.cxf.MaxResponseTime
-    help: Maximum Response Time
-    type: GAUGE
-    labels:
-      bus.id: $1
-      type: $2
-      service: $3
-      port: $4
-  - pattern: 'org.apache.cxf<bus.id=([^,]+), type=([^,]+), service=([^,]+), port=([^,]+), operation=([^,]+)><>MinResponseTime'
-    name: org.apache.cxf.MinResponseTime
-    help: Minimum Response Time
-    type: GAUGE
-    labels:
-      bus.id: $1
-      type: $2
-      service: $3
-      port: $4
-      operation: $5
-  - pattern: 'org.apache.cxf<bus.id=([^,]+), type=([^,]+), service=([^,]+), port=([^,]+), operation=([^,]+)><>MinResponseTime'
-    name: org.apache.cxf.MinResponseTime
-    help: Minimum Response Time
-    type: GAUGE
-    labels:
-      bus.id: $1
-      type: $2
-      service: $3
-      port: $4
-  - pattern: 'org.apache.cxf<bus.id=([^,]+), type=([^,]+), service=([^,]+), port=([^,]+), operation=([^,]+)><>TotalHandlingTime'
-    name: org.apache.cxf.TotalHandlingTime
-    help: Total Handling Time
-    type: GAUGE
-    labels:
-      bus.id: $1
-      type: $2
-      service: $3
-      port: $4
-      operation: $5
-  - pattern: 'org.apache.cxf<bus.id=([^,]+), type=([^,]+), service=([^,]+), port=([^,]+)><>TotalHandlingTime'
-    name: org.apache.cxf.TotalHandlingTime
-    help: Total Handling Time
-    type: GAUGE
-    labels:
-      bus.id: $1
-      type: $2
-      service: $3
-      port: $4
-  - pattern: 'org.apache.cxf<bus.id=([^,]+), type=([^,]+), service=([^,]+), port=([^,]+), operation=([^,]+)><>NumRuntimeFaults'
-    name: org.apache.cxf.NumRuntimeFaults
-    help: Number of runtime faults
-    type: GAUGE
-    labels:
-      bus.id: $1
-      type: $2
-      service: $3
-      port: $4
-      operation: $5
-  - pattern: 'org.apache.cxf<bus.id=([^,]+), type=([^,]+), service=([^,]+), port=([^,]+)><>NumRuntimeFaults'
-    name: org.apache.cxf.NumRuntimeFaults
-    help: Number of runtime faults
-    type: GAUGE
-    labels:
-      bus.id: $1
-      type: $2
-      service: $3
-      port: $4
-  - pattern: 'org.apache.cxf<bus.id=([^,]+), type=([^,]+), service=([^,]+), port=([^,]+), operation=([^,]+)><>NumUnCheckedApplicationFaults'
-    name: org.apache.cxf.NumUnCheckedApplicationFaults
-    help: Number of unchecked application faults
-    type: GAUGE
-    labels:
-      bus.id: $1
-      type: $2
-      service: $3
-      port: $4
-      operation: $5
-  - pattern: 'org.apache.cxf<bus.id=([^,]+), type=([^,]+), service=([^,]+), port=([^,]+)><>NumUnCheckedApplicationFaults'
-    name: org.apache.cxf.NumUnCheckedApplicationFaults
-    help: Number of unchecked application faults
-    type: GAUGE
-    labels:
-      bus.id: $1
-      type: $2
-      service: $3
-      port: $4
-  - pattern: 'org.apache.cxf<bus.id=([^,]+), type=([^,]+), service=([^,]+), port=([^,]+), operation=([^,]+)><>NumCheckedApplicationFaults'
-    name: org.apache.cxf.NumCheckedApplicationFaults
-    help: Number of checked application faults
-    type: GAUGE
-    labels:
-      bus.id: $1
-      type: $2
-      service: $3
-      port: $4
-      operation: $5
-  - pattern: 'org.apache.cxf<bus.id=([^,]+), type=([^,]+), service=([^,]+), port=([^,]+)><>NumCheckedApplicationFaults'
-    name: org.apache.cxf.NumCheckedApplicationFaults
-    help: Number of checked application faults
-    type: GAUGE
-    labels:
-      bus.id: $1
-      type: $2
-      service: $3
-      port: $4
\ No newline at end of file
diff --git a/deploy/resources.go b/deploy/resources.go
index e6c33d5..27fe5ae 100644
--- a/deploy/resources.go
+++ b/deploy/resources.go
@@ -298,13 +298,6 @@ var assets = func() http.FileSystem {
 
 			compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xac\x53\xcd\x6e\xdb\x3c\x10\xbc\xf3\x29\x06\xd6\x25\x01\x1c\xfb\xfb\x7a\x74\x4f\x6a\x62\xa3\x42\x03\xb9\x88\x9c\x06\x39\xae\xa5\xb5\xb4\x08\x45\xaa\x24\x15\xc5\x6f\x5f\x50\x96\x1b\x07\xbd\x86\x37\x81\xcb\xf9\xd9\x19\x25\xb8\xf9\xbc\xa3\x12\xdc\x4b\xc9\xc6\x73\x85\x60\x11\x1a\x46\xda\x51\xd9\x30\x0a\x7b\x08\x03\x39\xc6\xc6\xf6\xa6\xa2\x20\xd6\xe0\x2a\x2d\x36\xd7\xe8\x4d\xc5\x0e\xd6\x30\xac\x43\x6b\x1d\xab\x04\xa5\x35\x [...]
 		},
-		"/prometheus-jmx-exporter.yaml": &vfsgen۰CompressedFileInfo{
-			name:             "prometheus-jmx-exporter.yaml",
-			modTime:          time.Time{},
-			uncompressedSize: 19730,
-
-			compressedContent: []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x9c\x5d\x73\xda\xb8\x17\xc6\xef\xfd\x29\xce\x40\x67\x9a\xfc\x9b\x92\xff\x76\xb7\x37\x6c\x9a\x19\x9a\x97\x96\xd9\x14\x76\x80\x6c\xa7\xd3\x69\x67\x84\x7d\x30\x6a\x64\xc9\x2b\xc9\x40\xbe\xfd\x8e\xdf\xc0\x60\x87\x97\x84\x60\x41\xcb\x1d\x3e\x8f\x85\x7e\x8f\x8e\x1d\x3d\x40\xa8\xc2\xeb\xed\x3d\xac\x2a\xdc\x50\x1b\xb9\x42\x07\xb4\x00\x3d\x44\x68\xf8\xc4\x1e\x22\x74\xc5\x40\x8f\x89\x44\xb8\x16\x01\x77\x88\xa6\x82\xc3\x51\x [...]
-		},
 		"/templates": &vfsgen۰DirInfo{
 			name:    "templates",
 			modTime: time.Time{},
@@ -415,7 +408,6 @@ var assets = func() http.FileSystem {
 		fs["/operator-role-strimzi.yaml"].(os.FileInfo),
 		fs["/operator-service-account.yaml"].(os.FileInfo),
 		fs["/platform-cr.yaml"].(os.FileInfo),
-		fs["/prometheus-jmx-exporter.yaml"].(os.FileInfo),
 		fs["/templates"].(os.FileInfo),
 		fs["/traits.yaml"].(os.FileInfo),
 		fs["/user-cluster-role.yaml"].(os.FileInfo),
diff --git a/deploy/traits.yaml b/deploy/traits.yaml
index 9f1e7cd..f130ae1 100755
--- a/deploy/traits.yaml
+++ b/deploy/traits.yaml
@@ -516,9 +516,6 @@ traits:
   - name: service-monitor-labels
     type: '[]string'
     description: The `ServiceMonitor` resource labels, applicable when `service-monitor` is `true`.
-  - name: configmap
-    type: string
-    description: To use a custom ConfigMap containing the Prometheus JMX exporter configuration (under the `content` ConfigMap key).When this property is left empty (default), Camel K generates a standard Prometheus configuration for the integration.It is not applicable when using Quarkus.
 - name: pull-secret
   platform: false
   profiles:
diff --git a/docs/modules/traits/pages/prometheus.adoc b/docs/modules/traits/pages/prometheus.adoc
index 90beefd..6ab4ef9 100755
--- a/docs/modules/traits/pages/prometheus.adoc
+++ b/docs/modules/traits/pages/prometheus.adoc
@@ -48,12 +48,6 @@ The following configuration options are available:
 | []string
 | The `ServiceMonitor` resource labels, applicable when `service-monitor` is `true`.
 
-| prometheus.configmap
-| string
-| To use a custom ConfigMap containing the Prometheus JMX exporter configuration (under the `content` ConfigMap key).
-When this property is left empty (default), Camel K generates a standard Prometheus configuration for the integration.
-It is not applicable when using Quarkus.
-
 |===
 
 // End of autogenerated code - DO NOT EDIT! (configuration)
diff --git a/pkg/trait/prometheus.go b/pkg/trait/prometheus.go
index 1758739..40e994c 100644
--- a/pkg/trait/prometheus.go
+++ b/pkg/trait/prometheus.go
@@ -26,7 +26,6 @@ import (
 
 	monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
 
-	"github.com/apache/camel-k/deploy"
 	v1 "github.com/apache/camel-k/pkg/apis/camel/v1"
 	"github.com/apache/camel-k/pkg/util"
 )
@@ -54,17 +53,9 @@ type prometheusTrait struct {
 	ServiceMonitor *bool `property:"service-monitor" json:"serviceMonitor,omitempty"`
 	// The `ServiceMonitor` resource labels, applicable when `service-monitor` is `true`.
 	ServiceMonitorLabels []string `property:"service-monitor-labels" json:"serviceMonitorLabels,omitempty"`
-	// To use a custom ConfigMap containing the Prometheus JMX exporter configuration (under the `content` ConfigMap key).
-	// When this property is left empty (default), Camel K generates a standard Prometheus configuration for the integration.
-	// It is not applicable when using Quarkus.
-	ConfigMap string `property:"configmap" json:"configMap,omitempty"`
 }
 
-const (
-	prometheusJmxExporterConfigFileName  = "prometheus-jmx-exporter.yaml"
-	prometheusJmxExporterConfigMountPath = "/etc/prometheus"
-	prometheusPortName                   = "prometheus"
-)
+const prometheusPortName = "prometheus"
 
 func newPrometheusTrait() Trait {
 	return &prometheusTrait{
@@ -216,30 +207,3 @@ func (t *prometheusTrait) getServiceMonitorFor(e *Environment) (*monitoringv1.Se
 	}
 	return &smt, nil
 }
-
-func (t *prometheusTrait) getJmxExporterConfigMapOrAdd(e *Environment) string {
-	if t.ConfigMap != "" {
-		return t.ConfigMap
-	}
-
-	// Add a default config if not specified by the user
-	defaultName := e.Integration.Name + "-prometheus"
-	cm := corev1.ConfigMap{
-		TypeMeta: metav1.TypeMeta{
-			Kind:       "ConfigMap",
-			APIVersion: "v1",
-		},
-		ObjectMeta: metav1.ObjectMeta{
-			Name:      defaultName,
-			Namespace: e.Integration.Namespace,
-			Labels: map[string]string{
-				v1.IntegrationLabel: e.Integration.Name,
-			},
-		},
-		Data: map[string]string{
-			"content": deploy.ResourceAsString("/prometheus-jmx-exporter.yaml"),
-		},
-	}
-	e.Resources.Add(&cm)
-	return defaultName
-}


[camel-k] 01/04: chore(prometheus): Remove runtime provider API use from the Prometheus trait

Posted by as...@apache.org.
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 201f6abb126c142ee7cdfcb9a797440d3c782fea
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Thu Jan 28 16:55:46 2021 +0100

    chore(prometheus): Remove runtime provider API use from the Prometheus trait
---
 pkg/trait/prometheus.go | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/pkg/trait/prometheus.go b/pkg/trait/prometheus.go
index 1ce9505..1758739 100644
--- a/pkg/trait/prometheus.go
+++ b/pkg/trait/prometheus.go
@@ -19,6 +19,7 @@ package trait
 
 import (
 	"fmt"
+
 	corev1 "k8s.io/api/core/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/apimachinery/pkg/util/intstr"
@@ -82,12 +83,8 @@ func (t *prometheusTrait) Configure(e *Environment) (bool, error) {
 
 func (t *prometheusTrait) Apply(e *Environment) (err error) {
 	if e.IntegrationInPhase(v1.IntegrationPhaseInitialization) {
-		switch e.CamelCatalog.Runtime.Provider {
-		case v1.RuntimeProviderQuarkus:
-			// Add the Camel Quarkus MP Metrics extension
-			util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies, "mvn:org.apache.camel.quarkus:camel-quarkus-microprofile-metrics")
-		}
-		return nil
+		// Add the Camel Quarkus MP Metrics extension
+		util.StringSliceUniqueAdd(&e.Integration.Status.Dependencies, "mvn:org.apache.camel.quarkus:camel-quarkus-microprofile-metrics")
 	}
 
 	container := e.getIntegrationContainer()
@@ -107,12 +104,7 @@ func (t *prometheusTrait) Apply(e *Environment) (err error) {
 		Reason: v1.IntegrationConditionPrometheusAvailableReason,
 	}
 
-	var port int
-	switch e.CamelCatalog.Runtime.Provider {
-	case v1.RuntimeProviderQuarkus:
-		port = 8080
-	}
-
+	port := 8080
 	if t.Port == nil {
 		t.Port = &port
 	}