c12s-kubespray/roles/kubernetes-apps/prometheus/templates/node-exporter-daemonset.yml.j2
2017-02-28 07:59:58 -06:00

44 lines
1.1 KiB
Django/Jinja

apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: node-exporter
spec:
template:
metadata:
labels:
app: node-exporter
name: node-exporter
spec:
hostNetwork: true
hostPID: true
containers:
- image: "{{ node_exporter_image_repo }}:{{ node_exporter_image_tag }}"
args:
- "-collector.procfs=/host/proc"
- "-collector.sysfs=/host/sys"
name: node-exporter
ports:
- containerPort: 9100
hostPort: 9100
name: scrape
resources:
requests:
memory: {{ node_exporter_ds_mem_requests }}
cpu: {{ node_exporter_ds_cpu_requests }}
limits:
memory: {{ node_exporter_ds_mem_limit }}
cpu: {{ node_exporter_ds_cpu_limit }}
volumeMounts:
- name: proc
readOnly: true
mountPath: /host/proc
- name: sys
readOnly: true
mountPath: /host/sys
volumes:
- name: proc
hostPath:
path: /proc
- name: sys
hostPath:
path: /sys