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 <anto...@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 -}