forked from Altinity/clickhouse-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prometheus-template.yaml
49 lines (49 loc) · 1.11 KB
/
prometheus-template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
# Setup Prometheus
# Prometheus would be created in kubectl-specified namespace
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
name: prometheus
labels:
prometheus: prometheus
spec:
replicas: 1
retention: 1w
# only for speedup e2e tests
scrapeInterval: 5s
evaluationInterval: 5s
serviceAccountName: prometheus
# which ServiceMonitors to be used
serviceMonitorSelector:
matchLabels:
app: prometheus
ruleSelector:
matchLabels:
role: alert-rules
prometheus: prometheus
enableAdminAPI: false
alerting:
alertmanagers:
- namespace: ${PROMETHEUS_NAMESPACE}
name: alertmanager
port: web
---
# Setup ClusterIP Service
# Service would be created in kubectl-specified namespace
# In order to get access outside of k8s it should be exposed as:
# kubectl --namespace prometheus port-forward service/prometheus 9090
# and point browser to localhost:9090
apiVersion: v1
kind: Service
metadata:
name: prometheus
spec:
type: ClusterIP
ports:
- name: web
port: 9090
protocol: TCP
targetPort: web
selector:
prometheus: prometheus