-
Notifications
You must be signed in to change notification settings - Fork 1
/
monlat.yaml
77 lines (77 loc) · 1.43 KB
/
monlat.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
apiVersion: v1
kind: Service
metadata:
name: monlat
labels:
app: monlat
spec:
type: ClusterIP
selector:
app: monlat
ports:
- name: http-metrics
port: 9090
targetPort: 9090
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: monlat
namespace: default
labels:
app: monlat
spec:
replicas: 1
selector:
matchLabels:
app: monlat
template:
metadata:
labels:
app: monlat
spec:
serviceAccount: monlat
hostname: monlat
containers:
- name: monlat
image: docker.io/bonavadeur/monlat:v2
imagePullPolicy: Always
ports:
- containerPort: 9090
name: http-metrics
readinessProbe:
httpGet:
path: /healthz
port: 9090
initialDelaySeconds: 20
periodSeconds: 10
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- node1
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
app: monlat
name: monlat
namespace: default
spec:
endpoints:
- honorLabels: true
interval: 5s
path: /metrics
port: http-metrics
namespaceSelector:
matchNames:
- default
selector:
matchLabels:
app: monlat
---