apiVersion: apps/v1
kind: Deployment
metadata:
name: cadvisor
spec:
replicas: 1
template:
metadata:
annotations:
prometheus.xdavidwu.link/instance: parto
labels:
metrics: metrics
spec:
containers:
- name: cadvisor
image: gcr.io/cadvisor/cadvisor:v0.52.1
command:
- /usr/bin/cadvisor
- -logtostderr
- -docker_only
- -raw_cgroup_prefix_whitelist
- /lxc.payload
- -housekeeping_interval
- 30s
ports:
- name: metrics
containerPort: 8080
volumeMounts:
- name: cgroup
mountPath: /sys/fs/cgroup
readOnly: true
- name: machine-id
mountPath: /etc/machine-id
readOnly: true
readinessProbe:
httpGet:
port: metrics
path: /healthz
volumes:
- name: cgroup
hostPath:
path: /sys/fs/cgroup
- name: machine-id
hostPath:
path: /etc/machine-id
nodeSelector:
kubernetes.io/hostname: parto
tolerations:
- key: node-role.kubernetes.io/control-plane
effect: NoSchedule
securityContext:
runAsUser: 1000
runAsGroup: 1000