Merge "[AAI] Add model-loader tracing config"
[oom.git] / kubernetes / strimzi / templates / pod-monitor.yaml
1 {{/*
2 # Copyright (c) 2023 Deutsche Telekom
3 #
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
7 #
8 #       http://www.apache.org/licenses/LICENSE-2.0
9 #
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..
15 */}}
16 {{- if .Values.metrics.podMonitor.enabled }}
17 apiVersion: monitoring.coreos.com/v1
18 kind: PodMonitor
19 metadata:
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
23     ##
24     # labels:
25     #   prometheus: kube-prometheus
26   labels: {{- toYaml $.Values.metrics.podMonitor.labels | nindent 4 }}
27 spec:
28   selector:
29     matchLabels:
30       strimzi.io/cluster: {{ include "common.release" . }}-strimzi
31   podMetricsEndpoints:
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 }}
38     {{- end }}
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
44     {{- end }}
45 {{- end }}