Skip to content

Instantly share code, notes, and snippets.

@armchairlinguist
Created October 18, 2017 20:46
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save armchairlinguist/6c2349b8a329f4b266d7e8d42c98d50c to your computer and use it in GitHub Desktop.
Save armchairlinguist/6c2349b8a329f4b266d7e8d42c98d50c to your computer and use it in GitHub Desktop.
Logspout daemonset for Papertrail with Kubernetes
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: logspout-papertrail
spec:
template:
metadata:
labels:
name: logspout-papertrail
spec:
hostPID: true
hostIPC: true
hostNetwork: true
containers:
- resources:
requests:
cpu: 0.15
limits:
memory: 500Mi
env:
- name: SYSLOG_TAG
value: '{{ index .Container.Config.Labels "io.kubernetes.pod.namespace" }}[{{ index .Container.Config.Labels "io.kubernetes.pod.name" }}]'
- name: SYSLOG_HOSTNAME
value: '{{ index .Container.Config.Labels "io.kubernetes.container.name" }}'
- name: ROUTE_URIS
valueFrom:
secretKeyRef:
name: papertrail-destination
key: papertrail-destination
image: gliderlabs/logspout:master
name: logspout
volumeMounts:
- name: log
mountPath: /var/run/docker.sock
volumes:
- name: log
hostPath:
path: /var/run/docker.sock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment