forked from sourcegraph/deploy-sourcegraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cadvisor.DaemonSet.yaml
82 lines (82 loc) · 2.37 KB
/
cadvisor.DaemonSet.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
78
79
80
81
82
apiVersion: apps/v1
kind: DaemonSet
metadata:
annotations:
description: DaemonSet to ensure all nodes run a cAdvisor pod.
seccomp.security.alpha.kubernetes.io/pod: 'docker/default'
labels:
deploy: sourcegraph
sourcegraph-resource-requires: cluster-admin
app.kubernetes.io/component: cadvisor
name: cadvisor
spec:
selector:
matchLabels:
app: cadvisor
template:
metadata:
annotations:
description: Collects and exports container metrics.
prometheus.io/port: "48080"
sourcegraph.prometheus/scrape: "true"
labels:
deploy: sourcegraph
app: cadvisor
spec:
serviceAccountName: cadvisor
containers:
- name: cadvisor
image: index.docker.io/sourcegraph/cadvisor:3.21.1@sha256:8b9751e9a3df8875b8e34e3f148d5ada5a9115f9ed2685caf30d293cc5bcd1ea
args:
# Kubernetes-specific flags below (other flags are baked into the Docker image)
#
# disable container labels to allow whitelisting to reduce noise
- --store_container_labels=false
- --whitelisted_container_labels=io.kubernetes.container.name,io.kubernetes.pod.name,io.kubernetes.pod.namespace,io.kubernetes.pod.uid
# it is safe to uncomment this option if you use docker as your container runtime to reduce noise
# - --docker_only
resources:
requests:
memory: 200Mi
cpu: 150m
limits:
memory: 2000Mi
cpu: 300m
volumeMounts:
- name: rootfs
mountPath: /rootfs
readOnly: true
- name: var-run
mountPath: /var/run
readOnly: true
- name: sys
mountPath: /sys
readOnly: true
- name: docker
mountPath: /var/lib/docker
readOnly: true
- name: disk
mountPath: /dev/disk
readOnly: true
ports:
- name: http
containerPort: 48080
protocol: TCP
automountServiceAccountToken: false
terminationGracePeriodSeconds: 30
volumes:
- name: rootfs
hostPath:
path: /
- name: var-run
hostPath:
path: /var/run
- name: sys
hostPath:
path: /sys
- name: docker
hostPath:
path: /var/lib/docker
- name: disk
hostPath:
path: /dev/disk