blob: 158fce14262ec2315fe1796a7f4f55fdeaa8aea8 [file] [log] [blame]
Doyoung Lee8f30e152019-05-21 16:23:07 -07001---
2# Copyright 2018-present Open Networking Foundation
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.prometheus.enabled }}
17
18apiVersion: v1
19kind: ConfigMap
20metadata:
21 name: prometheus-config
22data:
23 prometheus.yml: |
24 global:
25 scrape_interval: {{ .Values.prometheus.interval }} # By default, scrape targets every 15 seconds.
26 evaluation_interval: {{ .Values.prometheus.interval }} # By default, scrape targets every 15 seconds.
27 # scrape_timeout is set to the global default (10s).
28
29 external_labels:
30 monitor: 'monitoring'
31
32 scrape_configs:
33 - job_name: 'prometheus'
34 static_configs:
35 - targets: ['{{ .Values.prometheus_host }}:{{ .Values.prometheus.nodePort }}']
36 - job_name: 'kube-metrics'
37 static_configs:
38 - targets: ['{{ .Values.cdn_remote_host }}:{{ .Values.cadvisor.nodePort }}', '{{ .Values.cdn_local_host }}:{{ .Values.cadvisor.nodePort }}']
39
40{{- end }}