2 # Copyright (c) 2023 Deutsche Telekom
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License..
16 {{- if .Values.metrics.podMonitor.enabled }}
17 apiVersion: monitoring.coreos.com/v1
20 name: {{ include "common.fullname" . }}-podmonitor
21 ## podMonitor labels for prometheus to pick up the podMonitor
22 ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md#monitoring.coreos.com/v1.PodMonitor
25 # prometheus: kube-prometheus
26 labels: {{- toYaml $.Values.metrics.podMonitor.labels | nindent 4 }}
30 strimzi.io/cluster: {{ include "common.release" . }}-strimzi
32 - port: {{ .Values.metrics.podMonitor.port }}
33 {{- if .Values.metrics.podMonitor.relabelings }}
34 ## RelabelConfigs to apply to samples before scraping
35 ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig
36 ## Value is evalued as a template
37 relabelings: {{- toYaml .Values.metrics.podMonitor.relabelings | nindent 6 }}
39 {{- if .Values.metrics.podMonitor.metricRelabelings }}
40 metricRelabelings: {{- toYaml .Values.metrics.podMonitor.metricRelabelings | nindent 6 }}
41 ## MetricRelabelConfigs to apply to samples before ingestion
42 ## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig
43 ## Value is evalued as a template