1 #######################################################################################
2 # Copyright ETSI Contributors and Others.
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
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 #######################################################################################
19 # Source: prometheus/templates/serviceaccount.yaml
27 chart: prometheus-19.6.1
30 namespace: istio-system
34 # Source: prometheus/templates/cm.yaml
42 chart: prometheus-19.6.1
45 namespace: istio-system
47 allow-snippet-annotations: "false"
54 evaluation_interval: 1m
58 - /etc/config/recording_rules.yml
59 - /etc/config/alerting_rules.yml
63 - job_name: prometheus
67 - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
68 job_name: kubernetes-apiservers
69 kubernetes_sd_configs:
73 regex: default;kubernetes;https
75 - __meta_kubernetes_namespace
76 - __meta_kubernetes_service_name
77 - __meta_kubernetes_endpoint_port_name
80 ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
81 insecure_skip_verify: true
82 - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
83 job_name: kubernetes-nodes
84 kubernetes_sd_configs:
88 regex: __meta_kubernetes_node_label_(.+)
89 - replacement: kubernetes.default.svc:443
90 target_label: __address__
92 replacement: /api/v1/nodes/$1/proxy/metrics
94 - __meta_kubernetes_node_name
95 target_label: __metrics_path__
98 ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
99 insecure_skip_verify: true
100 - bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
101 job_name: kubernetes-nodes-cadvisor
102 kubernetes_sd_configs:
106 regex: __meta_kubernetes_node_label_(.+)
107 - replacement: kubernetes.default.svc:443
108 target_label: __address__
110 replacement: /api/v1/nodes/$1/proxy/metrics/cadvisor
112 - __meta_kubernetes_node_name
113 target_label: __metrics_path__
116 ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
117 insecure_skip_verify: true
119 job_name: kubernetes-service-endpoints
120 kubernetes_sd_configs:
126 - __meta_kubernetes_service_annotation_prometheus_io_scrape
130 - __meta_kubernetes_service_annotation_prometheus_io_scrape_slow
134 - __meta_kubernetes_service_annotation_prometheus_io_scheme
135 target_label: __scheme__
139 - __meta_kubernetes_service_annotation_prometheus_io_path
140 target_label: __metrics_path__
142 regex: (.+?)(?::\d+)?;(\d+)
146 - __meta_kubernetes_service_annotation_prometheus_io_port
147 target_label: __address__
149 regex: __meta_kubernetes_service_annotation_prometheus_io_param_(.+)
150 replacement: __param_$1
152 regex: __meta_kubernetes_service_label_(.+)
155 - __meta_kubernetes_namespace
156 target_label: namespace
159 - __meta_kubernetes_service_name
160 target_label: service
163 - __meta_kubernetes_pod_node_name
166 job_name: kubernetes-service-endpoints-slow
167 kubernetes_sd_configs:
173 - __meta_kubernetes_service_annotation_prometheus_io_scrape_slow
177 - __meta_kubernetes_service_annotation_prometheus_io_scheme
178 target_label: __scheme__
182 - __meta_kubernetes_service_annotation_prometheus_io_path
183 target_label: __metrics_path__
185 regex: (.+?)(?::\d+)?;(\d+)
189 - __meta_kubernetes_service_annotation_prometheus_io_port
190 target_label: __address__
192 regex: __meta_kubernetes_service_annotation_prometheus_io_param_(.+)
193 replacement: __param_$1
195 regex: __meta_kubernetes_service_label_(.+)
198 - __meta_kubernetes_namespace
199 target_label: namespace
202 - __meta_kubernetes_service_name
203 target_label: service
206 - __meta_kubernetes_pod_node_name
211 job_name: prometheus-pushgateway
212 kubernetes_sd_configs:
218 - __meta_kubernetes_service_annotation_prometheus_io_probe
220 job_name: kubernetes-services
221 kubernetes_sd_configs:
231 - __meta_kubernetes_service_annotation_prometheus_io_probe
234 target_label: __param_target
235 - replacement: blackbox
236 target_label: __address__
239 target_label: instance
241 regex: __meta_kubernetes_service_label_(.+)
243 - __meta_kubernetes_namespace
244 target_label: namespace
246 - __meta_kubernetes_service_name
247 target_label: service
249 job_name: kubernetes-pods
250 kubernetes_sd_configs:
256 - __meta_kubernetes_pod_annotation_prometheus_io_scrape
260 - __meta_kubernetes_pod_annotation_prometheus_io_scrape_slow
264 - __meta_kubernetes_pod_annotation_prometheus_io_scheme
265 target_label: __scheme__
269 - __meta_kubernetes_pod_annotation_prometheus_io_path
270 target_label: __metrics_path__
272 regex: (\d+);(([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4})
273 replacement: '[$2]:$1'
275 - __meta_kubernetes_pod_annotation_prometheus_io_port
276 - __meta_kubernetes_pod_ip
277 target_label: __address__
279 regex: (\d+);((([0-9]+?)(\.|$)){4})
282 - __meta_kubernetes_pod_annotation_prometheus_io_port
283 - __meta_kubernetes_pod_ip
284 target_label: __address__
286 regex: __meta_kubernetes_pod_annotation_prometheus_io_param_(.+)
287 replacement: __param_$1
289 regex: __meta_kubernetes_pod_label_(.+)
292 - __meta_kubernetes_namespace
293 target_label: namespace
296 - __meta_kubernetes_pod_name
299 regex: Pending|Succeeded|Failed|Completed
301 - __meta_kubernetes_pod_phase
303 job_name: kubernetes-pods-slow
304 kubernetes_sd_configs:
310 - __meta_kubernetes_pod_annotation_prometheus_io_scrape_slow
314 - __meta_kubernetes_pod_annotation_prometheus_io_scheme
315 target_label: __scheme__
319 - __meta_kubernetes_pod_annotation_prometheus_io_path
320 target_label: __metrics_path__
322 regex: (\d+);(([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4})
323 replacement: '[$2]:$1'
325 - __meta_kubernetes_pod_annotation_prometheus_io_port
326 - __meta_kubernetes_pod_ip
327 target_label: __address__
329 regex: (\d+);((([0-9]+?)(\.|$)){4})
332 - __meta_kubernetes_pod_annotation_prometheus_io_port
333 - __meta_kubernetes_pod_ip
334 target_label: __address__
336 regex: __meta_kubernetes_pod_annotation_prometheus_io_param_(.+)
337 replacement: __param_$1
339 regex: __meta_kubernetes_pod_label_(.+)
342 - __meta_kubernetes_namespace
343 target_label: namespace
346 - __meta_kubernetes_pod_name
349 regex: Pending|Succeeded|Failed|Completed
351 - __meta_kubernetes_pod_phase
354 recording_rules.yml: |
359 # Source: prometheus/templates/clusterrole.yaml
360 apiVersion: rbac.authorization.k8s.io/v1
367 chart: prometheus-19.6.1
388 - "networking.k8s.io"
401 # Source: prometheus/templates/clusterrolebinding.yaml
402 apiVersion: rbac.authorization.k8s.io/v1
403 kind: ClusterRoleBinding
409 chart: prometheus-19.6.1
413 - kind: ServiceAccount
415 namespace: istio-system
417 apiGroup: rbac.authorization.k8s.io
421 # Source: prometheus/templates/service.yaml
429 chart: prometheus-19.6.1
432 namespace: istio-system
443 sessionAffinity: None
446 # Source: prometheus/templates/deploy.yaml
454 chart: prometheus-19.6.1
457 namespace: istio-system
474 chart: prometheus-19.6.1
477 sidecar.istio.io/inject: "false"
479 enableServiceLinks: true
480 serviceAccountName: prometheus
482 - name: prometheus-server-configmap-reload
483 image: "jimmidyson/configmap-reload:v0.8.0"
484 imagePullPolicy: "IfNotPresent"
486 - --volume-dir=/etc/config
487 - --webhook-url=http://127.0.0.1:9090/-/reload
491 - name: config-volume
492 mountPath: /etc/config
495 - name: prometheus-server
496 image: "prom/prometheus:v2.41.0"
497 imagePullPolicy: "IfNotPresent"
499 - --storage.tsdb.retention.time=15d
500 - --config.file=/etc/config/prometheus.yml
501 - --storage.tsdb.path=/data
502 - --web.console.libraries=/etc/prometheus/console_libraries
503 - --web.console.templates=/etc/prometheus/consoles
504 - --web.enable-lifecycle
506 - containerPort: 9090
512 initialDelaySeconds: 0
522 initialDelaySeconds: 30
530 - name: config-volume
531 mountPath: /etc/config
532 - name: storage-volume
535 dnsPolicy: ClusterFirst
541 terminationGracePeriodSeconds: 300
543 - name: config-volume
546 - name: storage-volume