Files
David Lyle 9c01cbfacb Proxy work around for alpine collectd
Add Dockerfile for building an alpine image with collectd.

Published an image to dockerhub and reference it in collectd.yaml

Signed-off-by: David Lyle <dklyle0@gmail.com>
2019-10-18 12:39:00 -05:00

64 lines
1.6 KiB
YAML

apiVersion: apps/v1
kind: DaemonSet
metadata:
name: collectd
spec:
selector:
matchLabels:
name: collectd-pods
template:
metadata:
labels:
name: collectd-pods
spec:
hostNetwork: true
tolerations:
- key: node-role.kubernetes.io/master
operator: Exists
effect: NoSchedule
terminationGracePeriodSeconds: 0
containers:
- name: collectd
image: dklyle/alpine-collectd:1.0
imagePullPolicy: IfNotPresent
securityContext:
# Run a priv container so we really do measure what is happening on the
# host (node) system
privileged: true
command: ["/bin/sh", "-c"]
args:
- collectd -f;
volumeMounts:
- name: collectd-config-volume
mountPath: /etc/collectd
- name: proc
mountPath: /mnt/proc
readOnly: true
- name: root
mountPath: /hostfs
readOnly: true
- name: etc
mountPath: /mnt/etc
readOnly: true
- name: opt
mountPath: /mnt/opt
volumes:
- name: collectd-config-volume
configMap:
name: collectd-config
items:
- key: collectd.conf
path: collectd.conf
- name: proc
hostPath:
path: /proc
- name: root
hostPath:
path: /
- name: etc
hostPath:
path: /etc
- name: opt
hostPath:
path: /opt