87 lines
2.6 KiB
Text
87 lines
2.6 KiB
Text
|
|
apiVersion: apps/v1
|
||
|
|
kind: DaemonSet
|
||
|
|
metadata:
|
||
|
|
name: node-exporter
|
||
|
|
namespace: {{ taskserv.namespace }}
|
||
|
|
labels:
|
||
|
|
app: node-exporter
|
||
|
|
app.kubernetes.io/managed-by: provisioning
|
||
|
|
spec:
|
||
|
|
selector:
|
||
|
|
matchLabels:
|
||
|
|
app: node-exporter
|
||
|
|
updateStrategy:
|
||
|
|
type: RollingUpdate
|
||
|
|
rollingUpdate:
|
||
|
|
maxUnavailable: 1
|
||
|
|
template:
|
||
|
|
metadata:
|
||
|
|
labels:
|
||
|
|
app: node-exporter
|
||
|
|
app.kubernetes.io/managed-by: provisioning
|
||
|
|
spec:
|
||
|
|
serviceAccountName: node-exporter
|
||
|
|
hostPID: true
|
||
|
|
hostNetwork: {{ taskserv.params.host_network | default(value=false) }}
|
||
|
|
{% if taskserv.params.host_network | default(value=false) %}dnsPolicy: ClusterFirstWithHostNet{% endif %}
|
||
|
|
tolerations:
|
||
|
|
- key: node-role.kubernetes.io/control-plane
|
||
|
|
operator: Exists
|
||
|
|
effect: NoSchedule
|
||
|
|
securityContext:
|
||
|
|
runAsNonRoot: true
|
||
|
|
runAsUser: 65534
|
||
|
|
containers:
|
||
|
|
- name: node-exporter
|
||
|
|
image: {{ taskserv.image }}
|
||
|
|
args:
|
||
|
|
- --path.procfs=/host/proc
|
||
|
|
- --path.sysfs=/host/sys
|
||
|
|
- --path.rootfs=/host/root
|
||
|
|
- --collector.filesystem.mount-points-exclude=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/pods/.+)($$|/)
|
||
|
|
- --web.listen-address=:{{ taskserv.provides.port | default(value=9100) }}
|
||
|
|
ports:
|
||
|
|
- containerPort: {{ taskserv.provides.port | default(value=9100) }}
|
||
|
|
name: metrics
|
||
|
|
volumeMounts:
|
||
|
|
- name: proc
|
||
|
|
mountPath: /host/proc
|
||
|
|
readOnly: true
|
||
|
|
- name: sys
|
||
|
|
mountPath: /host/sys
|
||
|
|
readOnly: true
|
||
|
|
- name: root
|
||
|
|
mountPath: /host/root
|
||
|
|
mountPropagation: HostToContainer
|
||
|
|
readOnly: true
|
||
|
|
readinessProbe:
|
||
|
|
httpGet:
|
||
|
|
path: /
|
||
|
|
port: {{ taskserv.provides.port | default(value=9100) }}
|
||
|
|
initialDelaySeconds: 5
|
||
|
|
periodSeconds: 10
|
||
|
|
livenessProbe:
|
||
|
|
httpGet:
|
||
|
|
path: /
|
||
|
|
port: {{ taskserv.provides.port | default(value=9100) }}
|
||
|
|
initialDelaySeconds: 15
|
||
|
|
periodSeconds: 15
|
||
|
|
failureThreshold: 3
|
||
|
|
resources:
|
||
|
|
requests:
|
||
|
|
cpu: 50m
|
||
|
|
memory: 50Mi
|
||
|
|
limits:
|
||
|
|
cpu: 250m
|
||
|
|
memory: 128Mi
|
||
|
|
volumes:
|
||
|
|
- name: proc
|
||
|
|
hostPath:
|
||
|
|
path: /proc
|
||
|
|
- name: sys
|
||
|
|
hostPath:
|
||
|
|
path: /sys
|
||
|
|
- name: root
|
||
|
|
hostPath:
|
||
|
|
path: /
|